Jump to content
Sign in to follow this  
mirkovonberner

How to extract text from a field?

Recommended Posts

Hi,

I have a field with a file path and I want to extract just a word from it, how I do it?

Example:

file: //Mac/Users/Me/Documents/Images/ProjectA/sculptures/A1.jpg

returns: sculptures

file: //Mac/Users/Me/Documents/Images/ProjectB/photographs/File5abc.jpg

returns: photographs

Edited by Guest
more explicit

Share this post


Link to post
Share on other sites

will that word be always the last folder in the path (before the filename)?

Share this post


Link to post
Share on other sites

will that word be always the last folder in the path (before the filename)?

Well, yes, that last folder name is what I need now.

The last part, the file name, is different every time and have different number of characters. BTW, once I get to know how to get that last folder name of the path maybe I would try to get the previous folder name as well :

TIA

Share this post


Link to post
Share on other sites

Try this:

Let

([

list = Substitute ( path ; "/" ; ¶ ) ;

values = ValueCount ( list )

];

GetValue ( list ; values - 1 )

)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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