Search Form for Multiple Products Tables
I have a question here.
1.How do I create a Products Search Form for Multiple Product tables (more than 1 table)?
You usually shouldn't have multiple product tables but rather one table with field to designate why the products are different, such as Type and/or Category.
Well it is like I have a Computer Products and Cosmetics Product and it has different fields on it , like Computer Products has Serial Number , Cosmetics product has a custom measurement like g (gram) or mL (milliliter)
Is it possible to have a Search Form for the multiple tables ? TYB
If the products are so different, couldn't a person tell whether they wanted to find a computer or a cosmetic? You could put two global text fields - one called gComputers and the other called gCosmetics. User would enter the search term then click button to fire script (or use script trigger on field exit of:
If [ IsEmpty ( gComputer ) and IsEmpty ( gCosmetics ) ]
Show Custom Dialog [ OK ; You must enter a value ]
If [ not IsEmpty (gComputer ]
Go To Layout [layout based upon computers ]
Enter Find Mode [ ]
Set Field [ your computer field ; "*" & gComputer & "*" ]
Set Error Capture [ On ]
Perform Find [ ]
... put your error trapping here
Go To Layout [ layout based upon Cosmetics ]
same as above for computer
But in truth ... the fact that you want to search both indicates that it might work better if they were together. Empty fields are cheap real estate. Nobody says you must have something in every field but it would depend upon how many fields. Some developers split; some keep together. I prefer together particularly if I get a hint that they may EVER need to be together for reports or searching. :smileyhappy:
UPDATE: Otherwise you can use one global and switch to one table, search and if no results, switch to the other table and search. However, if the User enters part of a phrase, it might find it in computers when they were looking for cosmetics.
Hi Laretta, Thanks for the idea. I will try it ... thanks
And Im just learning this File Maker ... Usually did on excel (Manually)
Retrieving data ...