rsgfmp Posted July 20, 2004 Posted July 20, 2004 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))
rsgfmp Posted July 21, 2004 Author Posted July 21, 2004 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
Vaughan Posted July 21, 2004 Posted July 21, 2004 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 )
rogermax Posted July 21, 2004 Posted July 21, 2004 rsgfmp: are you saying that you want the field background to change color and the text inside the field to be bold?
Cath D Posted July 21, 2004 Posted July 21, 2004 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
rsgfmp Posted July 21, 2004 Author Posted July 21, 2004 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
Recommended Posts
This topic is 7692 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 accountSign in
Already have an account? Sign in here.
Sign In Now