Skip to Content
author's profile photo Former Member
Former Member

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

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 😊

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 21, 2015 at 12:05 PM

    Hi Parvoleta,

    Try changing the code to:

    Val({Command.string_field})

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.