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

Selecting Text BEFORE a Search String


markpopham
 Share

Recommended Posts

Hello!

Apologies for my ignorance, I am just messing around with FileMaker. Basically I need to create a selectable text field which puts together a bunch of other text fields, and that's working out well - but in one case I need to pull just one line from a text field - from an address. Essentially, I need to pull the Country line from a text box that usually reads like this:

 

Awesome Company

2314 Street Address

City-town, Country, Zip Code

Attn: Joe Somebody

Phone: 555-1234

E-Mail: Somebody@gmail.com

 

I need to pull the entire line with the country and city in it; however, since these are all put in sort of haphazardly, that can be the third or fourth line. However, I know that I will always need the line BEFORE the line that starts "Attn:". So I can use Position to locate "Attn:", and then - if I wanted to grab everything AFTER and INCLUDING "Attn:" I could use the Middle Function. But is there a way to grab the line BEFORE and NOT INCLUDING the "Attn:"?

 

Thank you!

Link to comment
Share on other sites

Let (firstsnippet = Middle (YourTable::TextField; 1; Position (YourTable::TextField; "¶Attn"; 1; 1)-1);

 

GetValue (firstsnippet; ValueCount (firstsnippet) )

)

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share



×
×
  • Create New...

Important Information

Terms of Use