Select a specific row in a table and get the corresponding data master row

ashish.tyagi shared this question 8 years ago
Answered

93ec9f5adad514a2c1a43c4c1bebb989


Hi,


I have a table called vendor_list which is basically a data grid to which I have added an additional column called "Select" and where I have placed a check box. The table is populated using a data master called Vendors.


What I would like to do is to select all the data in Vendors where the "Select" check box is set to true in the Vendor_List table.


Thanks

Best Answer
photo

First, create the event that will filter the Data List according to the selected (true) checkboxes. Create an "On Click" + "Set Value" event for the filter button, with the Data List as the target of the set value action. Then, for the value, click 'calculated' and create this expression:

9586209f0d1c45699e4f93a4bb528d73


Then, we'll create a 'revert' button that will reset the Data List filter. Create an "On Click" + "Set Value" event for the revert button, with the Data List as the target of the set value action. For the value, click the 'from current data master' radio button.

1e20c95fbe8b6e1ca716299974b28ef5


Next, we'll create the event that will allow you to change the checkbox values, so that this Data List is truly dynamic. Select the checkbox in the Data List and create an "On Click" + "Data Master Action - Modify" event. Create this value:

96e0947e41f77dd0a3b8407b78163f75

(first space is the data list, Field 2 is the checkbox from the Data List)


Lastly, we'll create another button that will populate an Input Field with the results of the filter. On this button, create an "On Click" + "Set Value" event, with the Input Field as the target of set value action. For the value, click 'calculated' and build this expression:

7868a7ccca54f0d1be33f6204d602c37

(first space is the Data List, second is the input field from the Data List)

Check out the attached prototype to see the example file.

Comments (3)

photo
1

You just have to build the expression filter(vendor_list, checkbox), that would return all the rows that have the checkbox clicked and then use that expression as the value for a variable for instance. Have a look at this video http://www.justinmind.com/tutorials/a...

photo
1

Hi,


I went through the tutorial and then tried to implement selecting the row based on a On Click event on the checkbox. I set the variable Vendors on the click of the checkbox to Row_1. Here is the image:


356f33e038bfe9e53b3d3ab06a43743d


Then, I went to the following screen and tried to test the variable set in the previous screen by getting the values set in Vendors using the Select function. Here is the image:


However, I did not get any values in the text box which is populated on a On Page Load.


It would be great to see a debug window display these variables as we navigate from screen to screen.


Am I doing something wrong?


Thanks

photo
1

First, create the event that will filter the Data List according to the selected (true) checkboxes. Create an "On Click" + "Set Value" event for the filter button, with the Data List as the target of the set value action. Then, for the value, click 'calculated' and create this expression:

9586209f0d1c45699e4f93a4bb528d73


Then, we'll create a 'revert' button that will reset the Data List filter. Create an "On Click" + "Set Value" event for the revert button, with the Data List as the target of the set value action. For the value, click the 'from current data master' radio button.

1e20c95fbe8b6e1ca716299974b28ef5


Next, we'll create the event that will allow you to change the checkbox values, so that this Data List is truly dynamic. Select the checkbox in the Data List and create an "On Click" + "Data Master Action - Modify" event. Create this value:

96e0947e41f77dd0a3b8407b78163f75

(first space is the data list, Field 2 is the checkbox from the Data List)


Lastly, we'll create another button that will populate an Input Field with the results of the filter. On this button, create an "On Click" + "Set Value" event, with the Input Field as the target of set value action. For the value, click 'calculated' and build this expression:

7868a7ccca54f0d1be33f6204d602c37

(first space is the Data List, second is the input field from the Data List)

Check out the attached prototype to see the example file.