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 coding records

Featured Replies

Can someone please advise me on the calculation I need?

I have a field Hits (number) which can be empty, zero or any number from 1 to 20; a calculation field HitsStatus (result Container); and a repeating container field HitsColour.

HitsStatus 'colour codes' records depending on the number entered by the user in Hits.

At present HitsStatus is defined as

Case [Hits=0, GetRepetition [HitsColour,1],

[Hits<=5, GetRepetition [HitsColour,2],

[Hits<=10, GetRepetition [HitsColour,3],

[Hits<=15, GetRepetition [HitsColour,4],

[Hits<=20, GetRepetition [HitsColour,5]]

which shows a different colour as intended depending on the number of 'Hits'--- except that there is no difference in the colour shown in records when the field is empty in one and there is a zero in another.

How does this calculation need amending to show this? I have tried using IsEmpty but can't get the syntax correct.

Thanks in advance.

efen confused.gif

Hi efen,

Change it to read

Case(

Hits = 1, GetRepetition(HitsColour, 1),

Hits = 2, GetRepetition(HitsColour, 2),

Hits = 3,GetRepetition(HitsColour, 3),

Hits = 4,GetRepetition(HitsColour, 4),

Hits = 5,GetRepetition(HitsColour, 5))

HTH

Lee ooo.gif

  • Author

Hi Lee

This only gives a similar result to my calculation -- it doesn't differentiate between a zero entered in the Hits field or a blank field.

efen

Try this:

Case (IsEmpty(Hits),GetRepetition (HitsColour,1),

Hits=0, GetRepetition (HitsColour,2),

Hits<=5, GetRepetition (HitsColour,3),

Hits<=10, GetRepetition (HitsColour,4),

Hits<=15, GetRepetition (HitsColour,5),

Hits<=20, GetRepetition (HitsColour,6))

  • Author

Thanks Bob

Works great.

efen

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.