Object Name vs Conditional Formatting
Is there any way to create a Conditional Formatting based on the object name?
Eg; If(Object Name = Field X)
Got it, but can't think of a function that would work that way. If your button's were themselves global fields set up as buttons, you could use the expression:
self = Table::Global field
and you could then compare the contents of the two fields rather than comparing the contents to an object name, but that's the closest approach to what you want that I can think of.
Since a layout object's object name cannot be changed dynamically, how would you use such an expression in a conditional format?
I would like to give 20 different buttons a certain format, dependent on a value in a global field.
Instead of doing this manually (ie, If(GlobalField = X), If(GlobalField = Y), etc...) I would like to compare the ObjectName with the GlobalField. If the name is the same as the content in the GlobalField that button should be Green.
Yeah, I'm aware of that solution. But it takes time to set up (considering I already have all buttons at the correc places, the correct name etc)... :P
However - Thanks for the answers!
I set up 3 buttons (no field), all grey filled. I set conditional formatting on each to be green fill if GlobalField = 1 for the first button, 2 for the second, and 3 for the third. As I changed the global value the green highlight moved along the buttons. Is that not what you are trying to do?
Yes, Sorbsbuster, that is what I want to do. BUT - I want to have it all dynamically and with no hardcoded values.
In your case: If GlobalField = X (where X = the current ObjectName of the pressed button).
Unfortunately, I think that Phil is correct about this - it's not possible to solve in the current version of Filemaker.
Retrieving data ...