If the value that affects the conditional format is in a field, you may need to commit records.
I was able to add a button with this script:
Set Variable [$$Color ; value: Not $$Color ]
and then a conditional format expression of:
worked to change the tab panel fill color. (This script toggles the value of $$Color back and forth between True and False.)
If I gave the tab panel an object name, refresh object would also cause the color of the panel to update and this would seem a better option than refresh window.
Thank you. I understand that sometimes it works... trying to fix it when it does not.
Any suggestions are most welcome.
I am highlighting a tab in blue when ( a or b ) and c is true
If I do just ( a or b ) it now highlights correctly as with your example above.
a and b are check boxes within a portal. c on the other hand checks to see if a value exists within any record in a portal column.
There is a script trigger "On Save" for this column ( column 1 ) in the portal which refreshes the tab objects on this column, but it does not appear to help.
Conditional formatting for the tab is dependent on
Form 2::Test of Range Indicators required = 1
Now I should note that this record "Form 2::Test of Range Indicators required" changes values correctly when appropriate values are selected in the portal column. The conditional formatting on the tab does not change with the value. It does change if I go in and out of edit mode.
Test of Range Indicators required
is defined as follows: are either of the fields checked or does "livestock disturbance noted" appear in any record in this portal.( (not (IsEmpty ( Form 2::Community Watershed ))) or( not (IsEmpty ( Form 2::Known Domestic Intake Downstream))) )andLiveStock Flag for Range IndicatorLiveStock Flag for Range Indicator
is defined asSum ( Form 2 Data::livestock disturbance noted ) > 0livestock disturbance notedis defined asIf ( Column 1 = "livestock disturbance noted" ; 1 ; 0 )
I did make suggestion in my last post: Commit records may be needed to get things to update correctly on your layout.
OK, Commit records.
If I commit records on modify of "column 1" which is from a user interaction point of view where it should be.
I appears to nullify, that is delete or erase, data from the menu pick for that field.
This happens if I trigger "On Save" or "On Exit Also"
Feel like I am missing the obvious today.
Any specifics would be most welcome.
Commit records does not, by itself, erase data. I'd look for any other script triggers that your script might be tripping and interfering with the results that you expect to see. Commit Records can trip both OnObjectSave and OnCommitRecords triggers to name two possible issues.
This is an area where FileMaker Advanced becomes very valuable as you can enable the script debugger and then edit data on your layout. When a user action or script step trips a trigger, the trigger performed script will pop up in your debugger and you can step through the scripts one step at a time while watching your layout and the data viewer to see what changes at each point.
This can save many hours of sleuthing with the options available to you in FileMaker Pro.
OK, still working on this with the script debugger. I created a user level script called "commit records" and found that it over road the built in "commit records" which was useful as by tagging it with spoken feedback it was then easy to see where records were being committed. When I deleted this temporary script it appears to have removed the original "commit records". Any Idea how to get it back. I did not imagine that deleting a user level script would result in the loss of basic FM functions.
It does not. you can commit a record simply by clicking a blank area of your layout.
I can't really tell from your post what you mean by: "it appears to have removed the original "commit records"."
an alert box appears that says "This script cannot be found or has been deleted."
I currently have no calls in my scripts to "commit record"
This appears to be happening when the system uses commit record.
Open Layout Setup. Check the OnRecordCommit trigger. You've deleted the script, but not the trigger. The trigger tries to perform the script and shows that error as it can no longer find that script to perform. Clear that check box and this error message will go away.