Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7021 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Guys,

I'd like to do a find on a field (defined as text) and depending on whether the 1st character is alpa or numeric, act accordingly.

I'm ok on the logic and scripting side, I think I can extract the first character using the *Left ( text , number )* function - but how do I determine if it's alpha or numeric?

I can't seem to find the correct function.

Help appreciated.

Posted (edited)

That won't work, I am afraid. If text does not contain numeric characters, then [color:blue]TextToNum(text) = 0 is true.

So your If() will always return true.

Try instead:

Case(

IsEmpty( TextToNum( Left(text , 1 ) ) ) , "alpha" ,

"numeric"

)

or:

Case(

Length( TextToNum( Left(text , 1 ) ) ) , "numeric" ,

"alpha"

)

Edited by Guest
Posted (edited)

You can try this too:

Case(

GetAsNumber ( Left ( text; 1 ) ) = "";"alfha";

"numeric"

)

Oops: I realised only now that You have FM6...

the function GetAsNumber() is for 7 owners !!

Edited by Guest
wrong version

This topic is 7021 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.