Convert decimal value to percentage to show on UI

I have text box whose data source points to some attribute. This attribute gives me a decimal value. But while showing this value up on UI i want to multiply it with 100. For ex, if the attribute value is 0.04, on UI i want to display it as 4. Do i need to create microflow to achieve this? Or how else can it be done? (I have a lot of such text boxes whose value need to be converted to percentage).
2 answers

In the form you have for Decimal values in the properties a Decimal precision setting. Set this to 0 if you want the whole numbers.




I have misread your question. You could try adding an extra text attribute where you can put this calculated field as a string. Use an On Change microflow on the decimal field that calculates this and put this as string in the other field. You can then use this for displaying.



Hi Bundu,

I agree with Ronald's solution but also if you could EDIT the original post with the screen snap of the page you have designed we can help with coming up with the exact solution.

My suggestion is,

If the Page that's displaying these values is non-editable then you can call a MF where you can pass the object, update its existing values with change object activity - (Attribute(0.04) * 100) you can use math functions like round(),ceil(),floor() if needed. And the most important part - leave Commit option as NO and Refresh in client as Yes. In this way the values will get rolled back to previous state say 4 to 0.04 once you close the page.


This way it will allow you to use the same attributes and you wouldn't need extra attributes in your entity. Let us know what works best or you.