FileMaker: Refresh en conditional formatting
When shaking the dependency tree … mind your head!
TIP: In many pickers, we use a global variable to store the selected records in the found set. When clicking a record, the id is stored in the global variable. Then we use conditional formatting to highlight the lines selected. Unfortunately there has to be a ‘pricy’ refresh window script step for the conditional formatting to take place.
Not anymore !!!
This is how:
1. create a global field in an interface table and call it something like zgTrigger.
2. in the selection script, add the ‘set field’ script step and set zgTrigger to any value.
3. disable the refresh window script step!
4. add the zgTrigger field in the conditional formatting. You can place it in a Let() statement, so it doesn’t affect your conditional formatting calculation. Example: Let([trigger=_IF::zgTrigger];FilterValues($$ids;TABLE::__id)=TABLE::__id.
Explanation: because the trigger field is in the conditional formatting calculation, the formatting, and also the content of the field will be updated. This is handy for merge fields with <<$$globalVariable>> displayed on a layout. In this way you can update the content without a refresh window script step!