It should be possible, though it will be much easier to do if your portals are unfiltered. If they are filtered portals, your conditional format expressions will need to replicate the logic of your filter expression while the expression needed for an unfiltered portal just needs to check for the existence of a related record in the portal's table.
Unfortunately they are filtered. Can you provide a sample expression that I can plug my portable filters into? Thanks
Not really. There are way too many ways that you might write a filter expression.
My typical portal filters look like:
Table::field = "value" and table::field2 ≠"value"
Assuming I want the tab control to turn red when this portal is not empty, what would a conditional format expression look like?
Is there anyone that can shed some light on this?
My last response seems to have disappeared. Maybe I forgot to click "submit"...
What you describe would more easily be handled by incorporating the filter logic as part of the match fields in your relationship:
PortalTable::field = LayoutTable::Constvalue and
Portaltable::field2 ≠ LayoutTable::Constvalue2
Where ConstValue and ConstValue2 are calculation fields that return the "values" that you are putting in quotes in your portal filter.
A conditional format expression could also be used, but the tricky part is that you have to set it up to check every value in your set of related records so you can't just copy and paste your portal filter expression into the conditional formatting setup.
If you have Filemaker 12 or newer, you can use Not IsEmpty ( ExecuteSQL ( ".... Where your portal filter is replicated as the WHERE clause and a Join clause reproduces the basic match fields that you also have set up for the portal.
Thanks Phil. Seems like I messed up by not planning this functionality into my solution when I was initially building it. I don't have any true match relationships, as the table and layout is used simply as a dashboard. It has 1 record and uses an "X" operator to link to all other departments that I need to show on the dashboard. I just wanted a way of alerting users to "look" at certain tabs on the dashboard. For example, the Office Department may have 4 tab controls on the layout with 3 tabs in each one. If I can find a practical way to display a # or make the text change color, users would know what tabs to look at and address the alerts, rather than clicking through every tab on the dashboard to see if any items appear in the portals. Portals only display related records when something needs to be addressed. Do you have any other ideas besides cone formatting for this purpose?
I see no reason why the relationship based method that I described will not work for you. You simply need to add some fields to your Dashboard table to serve as "match" fields in the relationship to take the place of the filter.
And note that I also referred to a method that would use ExecuteSQL to determine whether any portal records currently pass the filter.
I never learned how to use the ExecuteSQL function, so I crossed out that option.
As for the relationship method, I actually misread it the first time and didn't realize how simple this could be. Thanks !