Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Calculation Field where the results equals one '$' character for every 100 dollars of value


This topic is 1431 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a calculation field, with a text result, that I want to give some sort of visual indication of how expensive an item is without displaying the actual price. 

 

In a list view, I would want that text calculation field to provide quick visual reference as to how expensive an item is:

 

ITEM 1 - $$$$$$$$$

ITEM 2 - $$$

ITEM 3 - $$$$$$

ITEM 4 - $$$$$$$$$$$

ITEM 5 - $$

 

Short of nested Ifs, what is an elegant way to achieve that calculation?

 

Thank you

Posted (edited)

A simple way would be to put a cap on the number of characters and do just:

Left ( "$$$$$$$$$$$$$$$$$$$$" ; Round ( Price / 100 ; 0 ) )

A more elegant way could be:

Let ( [
n = Round ( Price / 100 ; 0 )
] ;
Substitute ( 10^n - 1 ; [ "9" ; "$" ] ; [ "0" ; "" ] )
)

This still imposes a maximum on the input Price, but the limit is 404 characters (i.e. $40,400), so ...

--
P.S. Please update your profile to reflect your version and OS so we know what you can use.
 

Edited by comment

This topic is 1431 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.