Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Extracting a word via position function


Rob Evans

Recommended Posts

I need to extract from a field ("Combo data") one word. It is either the 3rd or 4th word in the field, depending on various circumstances, and it always follows a colon-space (": "). I just can't make the combination of Left or Right function together with the Position function do the job. Thanks.

Link to comment
Share on other sites

But if you want the word AFTER ": ", try:

 

Let ( [

pos = Position ( Combo data ; ": " ; 1 ; 1 ) ;

snip = Right ( Combo data ; Length ( Combo data ) - pos - 1 )

] ;

LeftWords ( snip ; 1 )

)

Link to comment
Share on other sites

I pasted your suggestion exactly nto my field calculation, but I get a message highlighting the second "snip" and telling me that "the specified field cannot be found."

Link to comment
Share on other sites

Which version of Filemaker?

 

This is weird:

If you have version 7 and above, it should work.

If it's version 6 or lower, it should bulk right at the starting "Let".

 

In any case, if you don't have version 7 or 8, use:

 

LeftWords (

Right (

combo data ,

Length ( combo data ) - Position ( combo data , ": " , 1 , 1 ) - 1

) ,

1 )

Link to comment
Share on other sites

Thanks and apologies. Your original calculaton did work. I had mistranscribed one part of it. I'm using FM 7 and now I have two ways to produce the same result. Many thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use