Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Conditional Text Formatting


This topic is 7800 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

  • Newbies
Posted

Thanks Harry,

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

Mel

This topic is 7800 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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