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.

Two Calculations for one field

Featured Replies

This is probably very simple: How do you place two calculations in a field (auto-enter data section)? If I just place these two calculations (see below) in this area, it gives me an error "An operator is expected here".

Any help is greatly appreciated in advance.

Shane

Case(Active = "Y"; TextColor (Medication ; RGB ( 58 ; 110 ; 165 ) ); TextColor ( Medication ; RGB ( 161 ; 161 ; 161 )))

Case(Active = "Y"; TextStyleAdd ( Dose ; Bold ); TextStyleRemove (Dose;Bold))

  • Author

Queue,

First of all, thank you for the tip. I tried your suggestion, but what was returned looked something like this:

Text (original without formatting statements)

Text Text [color:"blue"] (Duplicated the field contents and added the appropriate color and bolding)

All I want is to format a field that changes color (blue shade) and bolds the text when the condition is true, otherwise, the text will be gray and plain style. Any other thoughts?

Shane

These two functions refer to two different fields -- Medication and Dose. I think the functions should both refer to the same field, and be cascaded:

TextStyleAdd ( TextColor ( Medication ; RGB ( 58 ; 110 ; 165 ) ) ; Bold )

rsgfmp: are you saying that you want the field background to change color and the text inside the field to be bold?

Make each of the fields "Medication" and "Dose" auto enter calcs so that

Medication: If(Active = "Y"; TextColor (Medication ; RGB ( 58 ; 110 ; 165 ) ); TextColor ( Medication ; RGB ( 161 ; 161 ; 161 )))

Dose: If(Active = "Y"; TextStyleAdd ( Dose ; Bold ); TextStyleRemove (Dose;Bold))

Make sure you uncheck "do not replace existing value..." of each auto enter calc

  • Author

Vaughan,

Thank you very much! Works great! Also, thanks for figuring out the field "medication" was supposed to be in the second line as well instead of "dose". I apoligize for the confusion to others and appreciate everyone's input. I'll try not to make that kind of mistake again.

Shane

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.