Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I need extract certain characters from a text field. As an example I want just the second letter "e" from a text field containing the word "text". I believe I should use the position and left functions. I can't quite figure out how these work.

Posted

I agree.

However, the word "text" only has 1 "e", that not withstanding, I would suggest the following combination:

Middle ( SuppliedTextField ; Position ( SuppliedTextField ; "e" ; 1 ; 2 ) ; 1 )

Were the field not to contain a second "e" or your desired criteria, whatever that might be, what do you want returned as a result?

HTH

Tim

Posted

the word "text" only has 1 "e", that not withstanding, I would suggest the following combination:

Middle ( SuppliedTextField ; Position ( SuppliedTextField ; "e" ; 1 ; 2 ) ; 1 )

If the supplied text contains only one occurence of the "e" character, the calculation will return the first character of the supplied text.

If the supplied text does contain a second occurence of the "e" character, then it's a safe bet the result is going to be "e" - why calculate at all?

I am under the impression the question is actually "what is the second letter of text" - which is answered by:

Middle ( text ; 2 ; 1 )

Posted

I am under the impression the question is actually "what is the second letter of text"
That would make sense, wouldn't it?

I misread the op, sorry.

Tim

Posted

The question was "what is the second character", and middle does it. I knew there had to be a simple way to extract what I needed. Thanks!

This topic is 6012 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.