dbTalk Databases Forums  

Beginner question

comp.databases.filemaker comp.databases.filemaker


Discuss Beginner question in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
emerald
 
Posts: n/a

Default Beginner question - 08-23-2005 , 06:52 PM






Am using the Contact Management template that comes with FileMaker Pro 7.

Is there a way to do a find this way...type in a number in the first phone
field and it will find it if is in the first or second phone field?
I want it to look automatically in both fields. Sometimes the number I am
typing will be in the first or second and I don't know which field to try
first.

Thanks



Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Beginner question - 08-23-2005 , 07:41 PM






emerald wrote:

Quote:
Am using the Contact Management template that comes with FileMaker Pro 7.

Is there a way to do a find this way...type in a number in the first phone
field and it will find it if is in the first or second phone field?
I want it to look automatically in both fields. Sometimes the number I am
typing will be in the first or second and I don't know which field to try
first.

Thanks
A find will be performed only on the criteria as entered. You would have
to script placing the same criteria into a second field, in a new find
request.

At the very simplest, four script steps (get fancy later):

Copy (the first field)
New Record/Request
Paste (into the second field)
Perform Find.

Place a button on the layout specified to run that script.

In Find mode, enter the phone number in the first field and click the
button you created (not the built-in Find button).

Matt


Reply With Quote
  #3  
Old   
emerald
 
Posts: n/a

Default Re: Beginner question - 08-23-2005 , 08:27 PM



Thanks, just wrote my first script with your help...yeah.
It works great. Exactly what I needed.

Thank you so much.



Reply With Quote
  #4  
Old   
42
 
Posts: n/a

Default Re: Beginner question - 08-23-2005 , 09:23 PM



In article <MEOOe.32983$ll3.448543 (AT) twister (DOT) southeast.rr.com>,
emerald (AT) sc (DOT) rr.com says...
Quote:
Am using the Contact Management template that comes with FileMaker Pro 7.

Is there a way to do a find this way...type in a number in the first phone
field and it will find it if is in the first or second phone field?
I want it to look automatically in both fields. Sometimes the number I am
typing will be in the first or second and I don't know which field to try
first.

Thanks
Yes... but probably will require some work.

While I can't speak to the contact template directly, the templates that
ship with FM tend to be pretty weak.

What should be done is to build the thing to use a separate table with a
relationship and a portal. Then a search in the numbers portal will
return the correct record regardless of which related record the number
is in.

Its a much cleaner setup than any of the several clumsy or inefficient
methods you could use to script a double search of the two separate
fields.



Reply With Quote
  #5  
Old   
42
 
Posts: n/a

Default Re: Beginner question - 08-23-2005 , 10:47 PM



In article <e2QOe.32954$1J2.397726 (AT) twister (DOT) southeast.rr.com>,
emerald (AT) sc (DOT) rr.com says...
Quote:
Thanks, just wrote my first script with your help...yeah.
It works great. Exactly what I needed.

Thank you so much.
Yup it works a treat. There are issues with it though in terms of
flexibility.

Suppose you eventually add a 3rd phone number (home, mobile, office) now
you need to update the script.

Now suppose you want to be able to search multiple email addresses
(home, work, home2, mobile, blackberry), now you need another find
button with a bunch of new requests. Then suppose you want to be able
support multiple branch offices each with their own address...yet
another button to search them all.

But despite the pile of special purpose buttons at least it still
works...right?

Until you want to find someone whose email address is something or other
@companyx.com and who you recall has an office in the town of silverwood
or beechville. In a relational system this is easy to do... in a flat
system with duplicate fields... well...

lets just say your scripts utterly mangle it, and doing it manually
could take a very lengthy cumbersome find request...

Not saying that your choice was wrong - depending on your usage
patterns, data set size, and so forth it might be entirely appropriate.
I just wanted to illustrate the sort of thing that can go wrong.




Reply With Quote
  #6  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Beginner question - 08-24-2005 , 01:14 AM



It could also be the (rare) case to use the 'Repeating fields'. That
because if you have a repeating field of say 2 values, the find is made
on all values, whatever there order. Ie if you have 1111 in value 1 and
2222 in value 2, or 2222 in value1 and 1111 in value2, a 'find' on
'2222' will find it whatever its place. To be fair, this can also be
achieved if you have in your unique field a list of numbers separated by
'carriage return' : ie 1111¶2222 or 2222¶1111 will also find 2222
whatever its rank in the list. (Note "¶" stands for ''CR' carriage
return).
Remi-Noel


"emerald" <emerald (AT) sc (DOT) rr.com> a écrit ...
Quote:
Am using the Contact Management template that comes with FileMaker Pro
7.

Is there a way to do a find this way...type in a number in the first
phone field and it will find it if is in the first or second phone
field?
I want it to look automatically in both fields. Sometimes the number I
am typing will be in the first or second and I don't know which field
to try first.

Thanks





Reply With Quote
  #7  
Old   
emerald
 
Posts: n/a

Default Re: Beginner question - 08-24-2005 , 01:28 AM



Thanks for the advice and appreciate the headsup for potential problems.
For my needs, the phone number find is the most important thing for me. My
database needs are very simple. If I ever need anything more advanced, I
will know to use a different approach.




"42" <nospam (AT) nospam (DOT) com> wrote

Quote:
In article <e2QOe.32954$1J2.397726 (AT) twister (DOT) southeast.rr.com>,
emerald (AT) sc (DOT) rr.com says...
Thanks, just wrote my first script with your help...yeah.
It works great. Exactly what I needed.

Thank you so much.

Yup it works a treat. There are issues with it though in terms of
flexibility.

Suppose you eventually add a 3rd phone number (home, mobile, office) now
you need to update the script.

Now suppose you want to be able to search multiple email addresses
(home, work, home2, mobile, blackberry), now you need another find
button with a bunch of new requests. Then suppose you want to be able
support multiple branch offices each with their own address...yet
another button to search them all.

But despite the pile of special purpose buttons at least it still
works...right?

Until you want to find someone whose email address is something or other
@companyx.com and who you recall has an office in the town of silverwood
or beechville. In a relational system this is easy to do... in a flat
system with duplicate fields... well...

lets just say your scripts utterly mangle it, and doing it manually
could take a very lengthy cumbersome find request...

Not saying that your choice was wrong - depending on your usage
patterns, data set size, and so forth it might be entirely appropriate.
I just wanted to illustrate the sort of thing that can go wrong.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.