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.

Change Text Color based on Calc & Rounding Output

Featured Replies

Hello all,

i have a Question regarding the below Calculation. It is a Field where i want to display a Profit in Percent. If the Percent is below a certain Value, i like it to be red. To make this work, i had to define the profit_percent Field as a Text Field, otherwise the results would appear, but only black not color. However, if i make it a Text Field i cannot Round anymore to two Decimals. Does anybody know if i can fix it by using appropriate GetAsText or Number Functions? Only using the Round Function wont work.

 



Case ( 



IsEmpty ( sale ) or 

IsEmpty ( cost ) or 

IsEmpty ( min_buy_break ) or 

IsEmpty ( min_sale_break ) or 

IsEmpty ( sale_cur ) or 

IsEmpty (cost_cur) ; "" ;



Let(

[

profit = profit_amount / cost

profit_bad = GetAsText ( TextColor ( profit ; RGB ( 255 ; 0 ; 0 ) ) );

profit_good = GetAsText ( TextColor ( profit ; RGB ( 10 ; 140 ; 10 ) ) )];



Case(



profit > 20; profit_good & " %" ;  profit_bad & " %"

)

)

)



regards,

Overrider

Use the Round( ) function in the calc rather than the Round Number Format.

Ugo is right; modifify the profit line to read

profit = Round ( profit_amount / cost ; 2 )

  • Author

worked, thanks a lot guys.

Overrider

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.