Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Conditional button in layout?

Featured Replies

  • Newbies

I have a container field in a table (using FM 8.5) which holds a document. I can set up a button to display the document, but I'd like for the button to only be visible in the display if there are actually contents in the container field. I can't quite figure out how to optionally manage the presence of the button in the layout. Does anyone know how this might be done? Thanks!

it seems to me that the button will be there regardless of whether there is anything there or not - its just "invisible" or looks like a button.

If you take a button icon and copy and paste it into a global field then you can create a calculation called "Show button"

Lets say you have the field "Document" which is your container.

Create the field called "Global_Button" which is a Global Container field - insert the button into this field. Close the file and reopen it to keep the value there. if you are using fm server - you have to open the file locally - store the global and then reopen it on the server.

then create a calculation: "show_button" - which is a calculated field: if(isempty(field:document),"","global_button) - make certain that the type is "container".

then assign this field to the actual script that you want.

I do this - but use a repeating field for my global_button - and have 2 repetitions - one is a "dimmed" button, and one is a "highlighted" button - in this case the calculation changes to:

if(isempty(field:document),getrepetition(global_button,1),getrepetition(global_button,2))

  • 2 weeks later...
  • Author
  • Newbies

Thanks. That makes sense - I'll give it a try.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.