Change Color or Disable Button if empty field
I have a button on my layout that I need to either change color or disable unless there is data in a certain field.
How do I change the color until the user has entered data in a field?
Sounds like you need to change the color AND disable the button.
In layout mode, select the button by right clicking it and selecting conditional formatting.
Add a new conditional format using the formula option with an expression similar to this:
IsEmpty ( YourTable::FieldName )
And specify a fill color that you want when the field is empty. The fill color that you select here will be the color of the button when the field is empty. The color already specified for the button will be the color when the field is not empty.
Then to "disable the button", you'd enclose your button's script in an If Block like this:
If [ Not IsEmpty ( YourTable::FieldName ) ]
Put the rest of your script here
Note: FileMaker 13 users may prefer to use the Hide Object When setting to make this button disappear when the field is empty. Such hidden objects cannot be clicked so you do not need to modify your button's script if you use this feature to hide the button completely when the field is empty.
Retrieving data ...