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.

Can I make objects conditional on a layout?

Featured Replies

  • Newbies

Hi everybody

I am new to this forum, so here goes.

I am a keen to change the colour of fields on a screen on condition of its contents.

For example there is a "Copy Date" field that I would like to be black but then red if the system date is the same as the copy date.

I would also like objects to be visable or not visable on condition.

For example only "Manager" accounts can create new publications. I would like the "New Publication" button to only appear if the account = "Manager".

I would really appreciate any help here as I am just at the planning stages of a project and the above two issues could make an enormous difference to the design.

Many thanks

Sean

smile.gifsmile.gifsmile.gif

You can do the first by creating a calculated field.

In addition to the actual date field, create a calculated field like this returning a text value:

If ( Date = Get ( CurrentDate );  

     TextColor (date ; RGB ( 255 ;0 ;0 ) );

     Date 

)






If you want the date field to be editable on the same layout, place the calculated field directly on top of the original field, give it a background color, and make it non-enterable. 



For the button, the easiest approach would be to duplicate the layout, add the button to only one copy, and have a script decide which layout to display. You could also do some tricks with calculations to hide the button, but I think a separate layout is easier.



Here's pseudocode for a script


If get(username) = "Manager" 

   goto layout A

else

   goto layout B

end if

Creating scripts to manage all of the user interface navigation is a bit more work, but it gives you much better control and security.

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.