FormarPercent Structure atribute

Hello community, 

I'm trying to use the FormatPercent Function on a calculated attibute, or local variable, or on a structure attribute, and it always assume data type as text,but  it's decimal data type. Even if I use TextToDecimal, the function consider it is text data type. Can anyone help me?

I leave you an example.

Hi Rafael,

The FormatPercent() function description say that it returns Text as an output value and it is asking for Decimal type input value (first input) as mentioned below.

Either change the LHS Variable Data type to Text or wrap the FormatPercent() with TextToDecimal() built-in function as mentioned below.

Code Snippet

TextToDecimal(FormatPercent(sample.Percent, 3, "%"))

Hope this helps you!


Benjith Sam