Pdiddy
1
Hi Folks…
Is it possible to report a minus figure
e.g -23 (which is my “Qty. on Sales Order” field) as (23) for report purposes?
I tried the following
IF number < 0 THEN
EXIT(STRSUBSTNO(’(%1)’,number)
ELSE
EXIT(FORMAT(number));
But I was getting a Void conversion error… it was expecting a Text value?? when my field is a decimal
Hmm where am I going wrong please?
do you want to show -23 as 23?
If yes, use ABS(“Qty. on Sales Order”)
Try using the FORMAT function to change your decimal to a text value.
Hi,
You can try this.
IF number < 0 THEN
EXIT(’(’+format(number)+’)’)
ELSE
EXIT(FORMAT(number));
The “VOID conversion” error is caused by the use of EXIT. I guess the function or trigger where you use it has no return value defined (void).
Pdiddy
6
Hi…
Your solution was spot on…
Many Thanks
Pdiddy
7
Thanks… I realised that I had not coded it within a function