Conditional logic for a shape

Hello, I need to define a complex conditional logic for a shape I’m displaying on one of my screens.

  • I have 3 data tables each containing multiple records related to the current user. Each of these records (in all of the tables) has a field called “colour”
  • I would like the shape to be one of 3 colours (red,yellow,green) based on the following logic:
  • RED if there are no records for the current user in ANY of the 3 tables
  • YELLOW if there are records for the current user in ANY of the 3 tables, but NOT ALL of those records have the colour set to “green”
  • GREEN if if there are records for the current user in ANY of the 3 tables, and ALL of those records have the colour set to “green”

Thank you for any advice you can give!

Hi there, @debbie… I haven’t tested these conditions, but if I understand your post correctly, I think they should work. Note that I used an option set to define the colors, and I have a field called color on each of the data types that links to the colors option set.

In the red condition, here is the constraint on each of the searches.

In the yellow condition, here is the constraint on each of the searches.

In the green condition, here is the constraint on each of the searches in the first part of each expression.

And here is the constraint on the searches in the second part of each expression.

Hope this helps.

Best…
Mike

Hi Mike

This worked perfectly! Many thanks.

Debbie

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.