Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm wondering if this is possible... I have a button that I would like to toggle select all field selections except one. The field is called 'type' and the possible values are 1, 2, 3, 4, and 5. When I click the button I would like to select records that have 2, 3, 4, or 5 as their value in the 'type' field. I know that I could just add those values to the search string, but it is possible that I will have more values in 'type' than I do now in the future. So I would like to figure out a way to toggle select all except '1' instead of putting in all the other possible values into the search string. Is this possible?
Thanks!
Assign two actions to your button. In the first Action, Select "1". Make the second action "Select Excluded".
-Rob
You can make use of "Select Excluded" Action in properties
Assign two actions to your button. In the first Action, Select "1". Make the second action "Select Excluded".
-Rob
You can set your button to have the following actions:
1: Select in Field ; Field = type ; Search String = 1
2. Select Excluded ; Field = type
Thanks this works. But is there a way to reverse this operation using the same button on the next click? Like replicating the toggle select?
with the same button, no due to the logic the Actions were set.
You could however clone the button, with a Conditional Show (Property: Layout>>Show>>Conditional) using a variable.
This clone button will have either action/s:
A: To explicitly select '1'
1. Clear Field; Field = type
2. Select in Field ; Field = type ; Search String = 1 :
B: Since 1 is already excluded by previous button
1. Select Excluded ; Field = type
A possible solution using one button would be by using a trigger and a variable (as well as the original logic provided in the accepted answer to your question). At this point, you're probably well past needing this information, but I thought I'd provide it in case someone else has a similar problem.
First create a variable, i.e. vClearType, and assign it a value of 1. Go to the properties of your button > Action tab > Add > External > Set Variable. Assign the variable you created and set the value to: =If(vClearType=1,0,1). Click OK and go to Settings > Document Properties > Triggers. Select the variable you created in the Variable Event Triggers section and add an OnChange Action > Selection > Clear Field. Add the following to the Field section: =if(vClearType = 1,'Type').