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.

Negative number change to red?

Featured Replies

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?

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! wink.gif

-bd

  • Author

I

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.

Thanks Bob, exactly correct. Just got on cruise control answering the same as for more complicated tests.

-bd

  • Author

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.

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.