cancel
Showing results for 
Search instead for 
Did you mean: 

Error: String length is less than 0 or not an integer

Former Member
0 Kudos

Hello everyone,

I am kind of newbie here but soon it will change I hope so

So... I have a field which is number but combine with string - (lets say "500 km" for example).

I need to remove the 'km' part of it and to stay only number - 500.

This happen with:

tonumber (mid ({Command.string_field},1,(INSTR({Command.string_field}, "km")-1)))

But when i try to export it in pdf it gives me this error message - "string length is less than 0 or not an integer".

Any ideas how can manage with this??

Thank you in advance

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Parvoleta,

Try changing the code to:

Val({Command.string_field})

-Abhilash

Answers (0)