218
Views
1
Comments
FormarPercent Structure atribute
Question

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.

2021-03-18 21-03-15
Benjith Sam
 
MVP

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!


Regards,

Benjith Sam

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