____________________________________________________
Solved! Go to Solution.
Hi @FabioLuiz - you'll want to use Decode() to translate the coded value domains to the text you want to display. For formatting numbers, you'll want to use Text().
Hope this helps,
-Peter
Hi @FabioLuiz, your situation is a little bit interesting because the inclusion of the R$ in your field means that the numbers are stored as text. You could just manipulate the text field, but you could also convert to number and then back to text. I think the latter approach is better as the numbers are coming in without dividers to split by and are likely different lengths. See the example below:
var fld = 'R$ 12345.67'
var num = Number(Right(fld, count(fld) -3))
return "R$ " + Text(num, "###,###.##")
// returns R$ 12.345,67
Hope this helps,
-Peter
Hi @FabioLuiz - you'll want to use Decode() to translate the coded value domains to the text you want to display. For formatting numbers, you'll want to use Text().
Hope this helps,
-Peter
Hi @Anonymous User ,
the decode function works, thank you very much.
unfortunately I didn't understand how to use the TEXT () function.
The example I saw was:
- Text (12345678.123, '#. ###, 00') features '12 .345,678.12 '
- Text (1234.55, 'R $ #, ###. 00') presents 'R $ 1,234.55'
I don't know where I put it and if I need to declare a var.
Hi @FabioLuiz, your situation is a little bit interesting because the inclusion of the R$ in your field means that the numbers are stored as text. You could just manipulate the text field, but you could also convert to number and then back to text. I think the latter approach is better as the numbers are coming in without dividers to split by and are likely different lengths. See the example below:
var fld = 'R$ 12345.67'
var num = Number(Right(fld, count(fld) -3))
return "R$ " + Text(num, "###,###.##")
// returns R$ 12.345,67
Hope this helps,
-Peter
I agree with you, the second choice is better. Thank you very much for your help!