markpopham Posted June 29, 2012 Share Posted June 29, 2012 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! Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted June 29, 2012 Share Posted June 29, 2012 Let (firstsnippet = Middle (YourTable::TextField; 1; Position (YourTable::TextField; "¶Attn"; 1; 1)-1); GetValue (firstsnippet; ValueCount (firstsnippet) ) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.