Dollar functions returns $N/A for the value having more than 10 digits

Hi All,

 i have a dollar function inside the value feature of TextField, this works fine if the Value is less than 10 digits, if it is more than 10 , the Dollar functions returns $N/A

how can i overcome this

Thanks in advance

  Discussion posts and replies are publicly visible

Parents Reply Children
  • a!textField(
                        label: "Revenue at risk (US$)",
                        labelPosition: "ABOVE",
                        value: if(
                          rule!GLB_isBlank(
                            index(
                              ri!PF_Request,
                              "RevenueAtRisk",
                              null
                            )
                          ),
                          null,
                          fn!dollar()&
                            index(
                              ri!PF_Request,
                              "RevenueAtRisk",
                              null
                            ),

    this is the code I have written, please let me know what is the mistake

    I tried Text Field, Integer Field, Floating Field, Fixed, Text and Dollar()@"9999999999999999" is also not working

  • 0
    Certified Lead Developer
    in reply to vineethk0001

    I don't personally recommend using the code "fn!dollar() & index( etc...", as this won't actually call the dollar function on the value you're trying to convert (it will just insert a dollar sign, which can be done more easily just typing "$"). 

    To recap, the correct syntax for dollar() is:

    dollar(
      (value),
      (number of decimals) [optional],
      (exclude commas) [optional]
    )

    This example code (14 9's, or 99 trillion) works fine - once you add more 9's, the number starts behaing weirdly no matter what you do.

    dollar(
      "99999999999999",
      2
    )