612
Views
10
Comments
Format currency for value inside input widget
Question
Application Type
Reactive

Hi All,

I have an input field "Cost" , i want to format the value . I m trying it in onblur action using format currency built in function but its not working.

Input field type is Number. 

If anyone has a solution for this then that would be helpful!


Thanks

Shivangi


2024-04-12 15-17-49
João Miguel Santos

Hello Shivangi ,

Have you checked this component: https://www.outsystems.com/forge/component-overview/2258/input-masks-library

João Santos
 

2019-03-12 12-28-20
Shivangi Thakur

Thanks joao!

Will  check this.

2018-10-18 08-34-00
Eric Bulters
 
MVP

Hi Shivangi,

I am not sure what you are trying to achieve. Do you want to have a mask over the input?

If so have you tried the inputMask component from the forge?
https://www.outsystems.com/forge/component-overview/2258/input-masks-library


2019-03-12 12-28-20
Shivangi Thakur

Hi Eric,

If user input cost as 1000 then i have to format it like 1,000 . I can use format currency but since an input widget is used to type in the value so its not getting applied. Tried with assigning the variable binded with input widget in onblur action with formatted value, but it displays 0.

Hope I am able to explain it .

2018-10-18 08-34-00
Eric Bulters
 
MVP

In that case the forge component in my reply should do as you ask

2020-09-01 10-42-42
Stefano Valente

That component does weird things when you need the european mask.

but in this case its exactly what is needed.

2025-02-27 13-13-03
Poonam Agarwal

Hi Shivangi, 

i have attached a file , i think it would solve your problem.

Happy coding!



TestingApplications.oml
2019-03-12 12-28-20
Shivangi Thakur

Hi Poonam,

Checked this !

Comma was missing , i added that but seems like its not formatting properly.

Please refer attachment.

Thanks

Shivangi

TestingApplicationsSAMPLE.oml
2019-03-12 12-28-20
Shivangi Thakur

Hi All,

My issue is resolved , i modified the code provided by @Poonam Agarwal .

Thanks Poonam!

Attached is the sample oml.

TestingApplicationsSAMPLE.oml
2018-10-18 08-34-00
Eric Bulters
 
MVP

Hi Shivangi,

Great to hear your issue has been resolved. Please "Mark as solution" the answer that helped you solve the solution. That way it is clear to everyone that this issue has been solved.
Thank you.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.