Skip to Content
avatar image
Former Member

Dynamic decimal places

Hi All,

I have one our form, that decimal fields and numeric fields are defined Locale: Danish(Denmark). it shows all the amounts with 2 decimal places. like 62.83.

Now I want to change it, agree with the currency, in this case the currency is HUF and the result must be 6.283.

I already changed the field Locale to default Locale, but the result is the same 62.83 instead of 6.283.

My Form properties - Defaults - Default Form Locale has Viewer's system locale.

Any help is Welcome.

Best regards,

Ana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 16, 2010 at 02:31 PM

    Note the existence of the patterns. Display pattern should help you here.

    Otto

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 16, 2010 at 12:10 PM

    Try:

    - change the language of the form in the printing program (not sure if helps for the locale)

    - try to change the locale in the form, do not use default, pick a country from the list that matches your needs

    - move the functionality to backend, format the numbers there and send it as a string to the form fields

    - create multiple versions of a single field, where every field will have different static locale (denmark, germany etc.) and hide all the fields except the one that fits in (you will use some JS coding to check the value of some field from backend etc.).

    Regards Otto

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Otto,

      I have changed the locale for different languages, but the amount fields alwayse shows with 2 decimal places. Some puts like 6'500,00 instead of 650.000.

      Some idea for solve it?

      Thanks for all comments.

      Ana

  • Sep 17, 2010 at 07:22 AM

    I have no idea what flexibility you need. For some cases a simple write should suffice. It is very likely you will have to do this manually for some cases... Otto

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Otto,

      Thank you by the ideas, it helps to get the solution.

      My amount fields are defined in Global definition tab from interface but not in Currency/qtty field.

      Now it works, shows the amount agree with the currency defined.

      Thanks

      Ana