LaRetta Posted September 11, 2002 Posted September 11, 2002 I have a calculated summary field and, as a user enters data, I would like the summary to turn red if it goes negative. For instance, remaining contract $ available. If user spends too much, I'd like the Bal Remaining to go red & bold so user can see it immediately. Can this be done?
LiveOak Posted September 11, 2002 Posted September 11, 2002 This is done by stacking two calculated fields with different formatting, one black and the other red and bold, the top one set to be transparent. The trick here is that you can't just use a summary field in a calculation. THIS WON'T WORK!! DisplayBlack (calculation, number) = If(SummaryField>=0, SummaryField, "") DisplayRed (calculation, number) = If(SummaryField<0, SummaryField, "") THIS WON'T WORK!! Since the value of a summary field is context sensitive based upon what layout part it is located in, you must EXTRACT a value from a summary field using a GetSummary function. THIS WILL WORK!! DisplayBlack (calculation, number) = If(GetSummary(SummaryField,BreakField)>=0, GetSummary(SummaryField,BreakField), "") DisplayRed (calculation, number) = If(GetSummary(SummaryField,BreakField)<0, GetSummary(SummaryField,BreakField), "") THIS WILL WORK!! The "BreakField" is either: 1) If you are placing DisplayBlack and DisplayRed in a Subsummary part, BreakField is the "Subsummary when sorted by" field. 2) If you are placing DisplayBlack and DisplayRed in a Trailing Grand Summary part, BreakField is just the SummaryField. Sorry, sometimes there just isn't a really simple answer! -bd
bobsmith Posted September 11, 2002 Posted September 11, 2002 You can format the number to show negatives in red. Go to format Number and click on show as decimal and it will give you the options.
LiveOak Posted September 11, 2002 Posted September 11, 2002 Thanks Bob, exactly correct. Just got on cruise control answering the same as for more complicated tests. -bd
LaRetta Posted September 11, 2002 Author Posted September 11, 2002 Hi Bob. I did that and it didn't work -- probably because my Summary wasn't even working yet - go figure! I guess I just got ahead of the problem. Rushing a bit too much. In Approach, it took LotusScript to change a font color, and I assumed it would in FM also.
Recommended Posts
This topic is 8108 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