26
Views
3
Comments
Convert standard currency format in European format in input field without forge
Question

I have input field for amount and i have to  format that amount in European currency  

I want to show it in European format so 12.000,55 dot for thousands seperator and comma for decimals

Some example

1,000 dollars and euros:

Standard Format: $1,000.00

European Format: €1.000,00


I am not supposed to use any forge component any suggestions would be appreciated how i can achieve this and what is data type i have to keep like decimal currency or text.

Thanks

Rizwan

2024-09-17 12-24-07
Rammurthy Naidu Boddu
Champion

Hi @Mohammed Rizwan

As per you question In outsystems built in function for format currency 

FormatCurrency(87.63, "$", 2, ".", ",")

use this function.

2021-11-19 11-12-44
Rui Mendes

To create a function for formatting currency in Euros within OutSystems, follow these steps:

  1. Define the Client Action: Create a action named FormatEuro. This action will centralize the currency formatting logic.

  2. Input and Output Parameters:

    • Input: The action should accept a monetary value as input.
    • Output: The action should return the formatted currency string.
  3. Implement the Logic:

    • Use the FormatCurrency function to convert the input value to a Euro currency format. For example:

      FormatCurrency(In, "€", 2, ".", ",")

  4. Centralize Configuration: By centralizing the formatting logic in a server action, any changes to the formatting can be made in one place. This ensures consistency across the application and simplifies maintenance.

  5. Activate the Function Client Action: Ensure the action is callable from various parts of your application. 

  6. Example Usage:

    • Instead of directly formatting currency in multiple places, call the FormatEuro client action:


      By following these steps, you ensure that any adjustments to the currency formatting logic are applied universally, avoiding the need to update multiple instances throughout your codebase.
FormatEURO.oml
2024-10-12 12-11-20
Kerollos Adel
Champion

hallo @Mohammed Rizwan

you can check this two link and i think in case you need custom format can you create custom client action as function and use is 

https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/built_in_functions/format/

https://www.outsystems.com/forums/discussion/40055/currency-convert/


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