Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to search for a substring?

 
   Database Forums (Home) -> FileMaker RSS
Next:  Graph problem  
Author Message
renhoek57

External


Since: Nov 23, 2008
Posts: 2



(Msg. 1) Posted: Sun Nov 23, 2008 11:03 am
Post subject: How to search for a substring?
Archived from groups: comp>databases>filemaker (more info?)

Hi,


I'm fairly new at Filemaker, but I'm glad I dumped FoxPro for it.
Except for this:

I've exported all my Entourage emails into a database called
"Email.fp7", with fields called "To", "From", "Body", Date Sent",
etc.

But some of the messages were undeliverable. I want to locate the
people I sent those messages "To: " and put their name or e-mail
address in a field so I can stop sending them messages.

I'm trying to use a calculation to search for the line that says, "To:
Fred Flintstone " but I can't figure out
how to use the LEFT, LeftWord, POSITION or other function to search
for the recipient's name.

In FoxPro, there was a SUBSTRING() function, and I think I could have
used that. Is there some way to create a calculation to seach for the
recipient's name in a text field?

Thanks,

RH

 >> Stay informed about: How to search for a substring? 
Back to top
Login to vote
Christoph Kaufmann

External


Since: Jul 01, 2008
Posts: 9



(Msg. 2) Posted: Sun Nov 23, 2008 3:25 pm
Post subject: Re: How to search for a substring? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wrote:

> I'm trying to use a calculation to search for the line that says, "To:
> Fred Flintstone " but I can't figure out
> how to use the LEFT, LeftWord, POSITION or other function to search
> for the recipient's name.

Enter find mode
type *fflintstone into the text field
press enter

should find the records you want.

As this is obviously too simple, I may have failed to understand what
you're trying to accomplish. Please specify and state your Filemaker
version.
--
http://clk.ch

 >> Stay informed about: How to search for a substring? 
Back to top
Login to vote
Your Name

External


Since: Nov 01, 2008
Posts: 9



(Msg. 3) Posted: Mon Nov 24, 2008 1:25 am
Post subject: Re: How to search for a substring? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

wrote in message

> Hi,
>
>
> I'm fairly new at Filemaker, but I'm glad I dumped FoxPro for it.
> Except for this:
>
> I've exported all my Entourage emails into a database called
> "Email.fp7", with fields called "To", "From", "Body", Date Sent",
> etc.
>
> But some of the messages were undeliverable. I want to locate the
> people I sent those messages "To: " and put their name or e-mail
> address in a field so I can stop sending them messages.
>
> I'm trying to use a calculation to search for the line that says, "To:
> Fred Flintstone " but I can't figure out
> how to use the LEFT, LeftWord, POSITION or other function to search
> for the recipient's name.
>
> In FoxPro, there was a SUBSTRING() function, and I think I could have
> used that. Is there some way to create a calculation to seach for the
> recipient's name in a text field?
>
> Thanks,
>
> RH


Unless you've literally got hundreds / thousands of email addresses to
process, it's probably easier to Find and delete the unwanted records
manually, but ...

The Position function returns the number of characters into the text that
the seacrh text was found (or 0 if it wasn't found). This means you can find
where the "To:" text is with

Position ("To: "; TextField; 1; 1)

which tells FileMaker to find the text "To: " in the TextField's data,
starting at the first character and stopping when it finds the first
occurence.

Using this you can find the start and end of the email address by looking
for the "<" and ">" characters, again using the Position function, but
starting at the location the "To: " text was found.
eg.
"<" is at Position ("<"; TextField; Position("To: "; TextField; 1; 1);
1)
ie. find the first "<" after the "To: "

"<" is at Position (">"; TextField; Position("To: "; TextField; 1; 1);
1)
ie. find the first ">" after the "To: "

This means the email address will be found between these two and can be
extracted using the Middle function.
eg.
Middle (TextField;
Position ("<"; TextField; Position("To: "; TextField; 1; 1);
1) + 1;
Position (">"; TextField; Position("To: "; TextField; 1;
1) - Position ("<"; TextField; Position("To: "; TextField; 1; 1); 1) - 1; 1)
)

This tells FileMaker to extract some characters from the TextField's data,
starting at the character just after the "<" (ie. + 1) and taking the
correct number of character necessary to reach just before the ">" (ie. the
difference between where the ">" is minus where the "<" is, minus 1 more for
the "<" itself).

BUT,
this does assume that the first "To: " text is preceding the email address
and is not simply part of the subject for example.


NOTE: Being stuck on another computer to get Internet access means I haven't
got FileMaker handy, so some of these functions may have their parameters in
the wrong order. They also haven't been tested (I have tested the basic
formula in Excel though), so may need tweaking. Surprised(


Helpful Harry
Approaching four weeks of hopeless Internet Provider problems. xo(
 >> Stay informed about: How to search for a substring? 
Back to top
Login to vote
renhoek57

External


Since: Nov 23, 2008
Posts: 2



(Msg. 4) Posted: Thu Nov 27, 2008 4:07 am
Post subject: Re: How to search for a substring? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Harry,

With a little tweeking, your formula worked! When you broke it down in
pieces, it helped me understand what the functions were doing. Very
clever. Thank you very much.

And Christoph, thanks for your input, too.

RH

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


On Nov 24, 12:57 am, "Your Name" wrote:
> wrote in message
>
>
>
>
>
> > Hi,
>
> > I'm fairly new at Filemaker, but I'm glad I dumped FoxPro for it.
> > Except for this:
>
> > I've exported all my Entourage emails into a database called
> > "Email.fp7", with fields called "To", "From", "Body", Date Sent",
> > etc.
>
> > But some of the messages were undeliverable. I want to locate the
> > people I sent those messages "To: " and put their name or e-mail
> > address in a field so I can stop sending them messages.
>
> > I'm trying to use a calculation to search for the line that says, "To:
> > Fred Flintstone " but I can't figure out
> > how to use the LEFT, LeftWord, POSITION or other function to search
> > for the recipient's name.
>
> > In FoxPro, there was a SUBSTRING() function, and I think I could have
> > used that. Is there some way to create a calculation to seach for the
> > recipient's name in a text field?
>
> > Thanks,
>
> > RH
>
> Unless you've literally got hundreds / thousands of email addresses to
> process, it's probably easier to Find and delete the unwanted records
> manually, but ...
>
> The Position function returns the number of characters into the text that
> the seacrh text was found (or 0 if it wasn't found). This means you can find
> where the "To:" text is with
>
> Position ("To: "; TextField; 1; 1)
>
> which tells FileMaker to find the text "To: " in the TextField's data,
> starting at the first character and stopping when it finds the first
> occurence.
>
> Using this you can find the start and end of the email address by looking
> for the "<" and ">" characters, again using the Position function, but
> starting at the location the "To: " text was found.
> eg.
> "<" is at Position ("<"; TextField; Position("To: "; TextField; 1; 1);
> 1)
> ie. find the first "<" after the "To: "
>
> "<" is at Position (">"; TextField; Position("To: "; TextField; 1; 1);
> 1)
> ie. find the first ">" after the "To: "
>
> This means the email address will be found between these two and can be
> extracted using the Middle function.
> eg.
> Middle (TextField;
> Position ("<"; TextField; Position("To: "; TextField; 1; 1);
> 1) + 1;
> Position (">"; TextField; Position("To: "; TextField; 1;
> 1) - Position ("<"; TextField; Position("To: "; TextField; 1; 1); 1) - 1; 1)
> )
>
> This tells FileMaker to extract some characters from the TextField's data,
> starting at the character just after the "<" (ie. + 1) and taking the
> correct number of character necessary to reach just before the ">" (ie. the
> difference between where the ">" is minus where the "<" is, minus 1 more for
> the "<" itself).
>
> BUT,
> this does assume that the first "To: " text is preceding the email address
> and is not simply part of the subject for example.
>
> NOTE: Being stuck on another computer to get Internet access means I haven't
> got FileMaker handy, so some of these functions may have their parameters in
> the wrong order. They also haven't been tested (I have tested the basic
> formula in Excel though), so may need tweaking. Surprised(
>
> Helpful Harry
> Approaching four weeks of hopeless Internet Provider problems. xo(
 >> Stay informed about: How to search for a substring? 
Back to top
Login to vote
xox

External


Since: Dec 01, 2008
Posts: 1



(Msg. 5) Posted: Mon Dec 01, 2008 8:38 am
Post subject: Dumped FoxPro [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Out of curiousity, why are you glad you dumped FoxPro?

> I'm fairly new at Filemaker, but I'm glad I dumped FoxPro for it.
 >> Stay informed about: How to search for a substring? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Search problem - how to act when user has left search fiel.. - FMP 6.04, WinXP Dear Listeners, I have what looks like an 'easy' problem but I simply can't find the maybe 2 or 3 correct additional script steps to solve it and would appreciate any help. Brain cell shortage I presume. There are 4 layouts: Menu List...

keyword search on all fields - i'm looking at moving over from a regular contact manager like Act!. I put together a flat file database. If I need to do a keyword search on all my fields for a certain word or words, how is that done in FM? Thanks

View Search Results - I have created a database where the user can search for an item number (partial or full). A script is then run to perform the search and show results in a separate layout. This layout shows a summary of the search results with matching items (item number...

Search selected OR from all records - Hi, In the DB, there are 3 fields : Object (text) Color (yellow, blue, red) Color_Selected : pop-up menu displays values from Color list then I create the Script "Color_Find": Go to Layout ["Home"] Enter Find Mode [] Insert Cal...

Q: Multiple values in a search field? - Hello All: How do I enter multiple values in a field when searching? Sam
   Database Forums (Home) -> FileMaker All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]