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 Text Formatting

Featured Replies

  • Newbies

Hello all,

I would like to display selected data values in a portal with a different background (or text colour) depending on the value in a repeating field. This is part of a Resource Booking system, where repeating bookings show up as a different colour.

New or casual bookings need to be easily noticed amongst the others.

The portal contains data based on a self-join where the ResourceID is the primary key. A row of the portal contains timeslots, while each portal row contains each of the ten days of a 2 week cycle.

Each record of the database contains resourceID, slot1, slot2...slot10

Slots 1-10 are repeating fields (3 repetitions) that show Booking details, availability (contains "YES" or a staffcode to indicate who made the booking), permanent booking (contains "YES" or "NO")

I have been able to use container fields which contain a coloured background, but cannot get the background colour to change for each portal row. The color in all cases is shown but only depends on the first row of the portal.

I hope that is not too confusing.

Thanks in advance..

Mel confused.gif

The container field must be defined in the related file and added to the portal like the other related field (ie. RelatedFile::ContainerField).

Having a calculated container field in the main file that says something like:

Container = If(RelatedFile::Booking="Yes", UseBlue, UseRed)

won't work. This simply uses the value of the FIRST related Booking field rather than for each separate portal row.

Another trick for young players is if you make the container field slightly too big to fit the portal row then it does some peculiar things. Try making the field just a small square next to the other fields and see what happens.

  • Author
  • Newbies

Thanks Harry,

This is my first big project and I haven't quite got a handle on some of these issues..

Mel

  • Author
  • Newbies

Hi Harry,

your solution worked perfectly..much appreciated

mel

laugh.gif

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.