Textbox display decimal as percentage

0
Hi all! Is it somehow possible to make a textbox display its decimal value as a percentage, so that in the background it is saved e.g. as 0.04 but the textbox shows 4%, as it is equivalent? Surely this cannot be too odd of a request, it is quite an elemental feature of Excel. I am not just interested in displaying it, but also the other way around. The user should be able to recognize that he can input the value as percentage (not as decimal value) and then just put in the ‘4’ (to stick with the earlier example) for the app to then store 0.04 as the attribute value. Thanks in advance!
asked
2 answers
1

Hi David,

As far as I know there is no standard functionality to do this, but it will be easy to achieve.

In this case you should use two attributes: Input & InputDisplay

On the screen you show the attribute Input Display. When this is changed by a user you call an on change microflow.

The on change microflow changes the Input to InputDisplay/100.

The same should work the other way around, when Input is changed by the system or when opening the page that displays the data InputDisplay should be set to Input*100.

 

Hope this helps

answered
0

There are many ways to do it. For example it can be achieved using on change and on leave microflows. You need to use two attributes, Input (String) and ProcessedInput (Decimal) Here is one way to implement it:

On change

 

On Leave

answered