Hide image(button) if Field value = 0
I want an image (also functioning as a button) to be displayed if a field value = 0 and once the field value = 1 then the image should disappear automatically.
Put the image in a global container field.
Define a calculation with "container" specified as its return type.
Define the calculation as:
If ( FieldValue = 0 ; GlobalContainerField )
Put this calculation field on your layout and either set it up as your button.
Phil's response is workable and sensible. As another approach that would avoid the two extra fields described above, you could put the image-based button on your layout, then overlap that with a text object containing only a space; normally the text object should be transparent, but give it a conditional-formatting fill color to match your layout background for the condition(s) in which it should blank out the button (FieldValue = 1 ).
The weakness here is that it'd be nigh-impossible to mask the button if the layout background were a gradient, image, or anything else other than a solid color. Also, any tooltip text you have on the image-button would be suppressed by the overlapping text object; if you needed a tooltip using this approach, you'd need to put it on the text object.
There are a number of options for controlling layout object visibility. See this demo file: http://www.4shared.com/file/XGrhkmVV/LayoutObjectVisibilityControlD.html
In addition, I've read that Filemaker 12 users can use conditional formatting to make tab panels appear and disappear--though I haven't tried it...
Retrieving data ...