slicknick515
Technical User
I use the formula below to suppress leading zeros of a number but i want to replace the {FIELD1} with the (Sum of {FIELD1})
Is this possible?
WhileReadingRecords ;
StringVar text := Totext ( {FIELD1} , 4 , "" ) ;
NumberVar end := length ( text ) ;
NumberVar clip :=
(if Val ( text [ end - 4 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 3 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 2 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 1 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 0 to end ] ) = 0 then 1 else 0 ) ;
text [ 1 to Length ( text ) - clip ]
Is this possible?
WhileReadingRecords ;
StringVar text := Totext ( {FIELD1} , 4 , "" ) ;
NumberVar end := length ( text ) ;
NumberVar clip :=
(if Val ( text [ end - 4 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 3 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 2 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 1 to end ] ) = 0 then 1 else 0 ) +
(if Val ( text [ end - 0 to end ] ) = 0 then 1 else 0 ) ;
text [ 1 to Length ( text ) - clip ]