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 7199 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a text string that is a file location. Its something like X:usersfreddocuments, or W:filesgeorgeshared.

I want to extract the user name from the middle of that. The user names are all different lengths, and the locations are all different, so i can't use an exact length right/left function. I need to basically filter everything before the second slash and after the third.

Any ideas.

Posted

Middle (

yourtext;

Position ( yourtext; "" ; 1 ; 2 ) +1 ;

Position ( yourtext; "" ; 1 ; 3 ) - Position ( yourtext; "" ; 1 ; 2 ) - 1

)

But I realized that this only works if the location is similiar, with a patterncount you could make it a bit more precise but not all the way....

Posted

The calculation does not appear to like the "". Its asking for another operator.

Not sure how I would apply patterncount to this. Could you elaborate? Thanks!

Posted

The calculation works in v6, in order for it to work in v7, you have to escape the "", with a second

this amended calculation works for the examples given.

Middle( text;

Position( text ; "" ; 1 ; 2 ) +1;

Position( text ; "" ; 1 ; 3 ) -

Position( text ; "" ; 1 ; 2 ) -1

)

Lee

cool.gif

Posted

MiddleWords(Substitute(Text; ""; " ");3;1) also works.

edit: Though in the above spaces in a folder name would throw off the calculation.

Substitute(MiddleValues(Substitute(Text; "";

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