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.

Colour layout items based on calculation

Featured Replies

  • Newbies

Hi all,

I have a fairly simple database where I need to change the colour of a layout item based whether or not the expiry date is less than today's date. Basically the layout is designed like a simple card and I just want to turn the card red if the it's expired and needs renewing. So my question is, is it possible to change the colour of layout items (a simple rectangular box in this case) based on this calculation. I have no problem with setting up the script for this, I'm just not sure whether I can change the colour of a layout item based on it.

Many thanks for any help

Cheers

Kevin

Use conditional formatting on the "card" (your expiry date field) with a calc something like:

Expiry date < Get(CurrentDate)

and with the colour red as the result

is it possible to change the colour of layout items (a simple rectangular box in this case) based on this calculation.

Some layout objects - not all - can be formatted conditionally. A rectangle is not one of these, but you can use a text object (with only a space as the text) instead.

Buttons are great for conditional formatting, this way you dont need any dummy fields - they can even have rounded corners :)

Only minus is a minimum height of 5 px, ( font size = 1 )

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.