Hiding Fields based on other fields
Hope all is well. I have two fields Expiry Date and Retest Date. I want to hide the Retest Date When I have a value for for Expiry date and vice versa. Im using FMP14.
Thank you for your message.
Sounds like a perfect application for the "Hide Objects When" feature of FileMaker Pro.
In Layout mode, click on the field you want to hide and in the Inspector, choose the Data tab. In the Behavior section you can specify a condition when the object you have selected will be hidden. So, in your case it might be something as simple as...
...so that when something in the Expiry Date field, the Retest Date is not shown, but if the Expiry Date field is blank then the Retest Date field displays on your layout.
Although I'd be a little leery about applying this to both fields as you could run into a situation easily where both fields are hidden on your layout - unless you have alternate means of unhiding them in other parts of your solution.
Thank you so much...but forgive me because I dont get what you mean. Can you please make it clearer for me:
My Table Name is Products
and my two fields are:
Products:: Retest Date
Thank you so much
Unless you are using FileMaker 13 or newer, Hide Object When will not be an option that you can use. Are you using an older version of the software?
If you are using 13 or newer,
Select the Expiry Date field while in layout mode and then enter the following expression into the Hide Object When box found in the Inspector's Data tab:
Not IsEmpty ( Products::Retest Date )
Then select the Retest Date field and give it the same expression but referring to the expiry field:
Not IsEmpty ( Products::Expiry Date )
Save your changes and return to Browse mode.
Retrieving data ...