Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ToNumber & Selection Expert 1

Status
Not open for further replies.
Jun 16, 2000
199
US
I am on version 7 and need some assistance with the following:

I have a field called docnumber that is a character string. I need to be able to select only those docnumbers that are < 50000. Since the field is a character, sorting doesn't put them in numberical order and therefore my selection doesn't include a docnumber such as 788.

I have tried the ToNumber formula. I needed to include While Printing Records in the formula or else I would get the error message: 'The String is Non-Numberic'. Now, I can't limit my selection of course to < 50000 since it is coverting after reading...

Can someone offer any suggestions? If not with the selection, maybe in a formula to sum amts with doc# < 50000?

Thanks!
 
NumericText tests to see if the content of a text object is a Number.

If the entire content of the field is a Number - or if the characters extracted via the Subscript for arrays and strings are entirely a Number - the function returns a TRUE value.
If any part of the content of the field - or of the characters extracted - are not a Number, the function returns the value FALSE.

If NumericText({file.REFERENCE}) Then
ToNumber({file.REFERENCE})
Else
0;
You may also want to use this function to examine the data, with a formula like
If NumericText({file.REFERENCE}) Then
&quot;Can be converted to number'
Else
&quot;Cannot convert: &quot; + {file.REFERENCE};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top