Jump to content

Search multiple fields with the same text?


This topic is 8571 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I would really appreciate any help:

I don't want to put multiple search fields on my custom webpage. Is it possible to just add one text field to the web page that would search from multiple fields in the database (name, phone, address, etc)? How do I do this? What's the correct CDML code? This is the current tag, so how do I change it to include phone, address, etc fields in the search?

<INPUT TYPE="hidden" NAME="-op" VALUE=eq><INPUT TYPE=text NAME="CompanyNAME" VALUE="" SIZE=30>

If that's not possible I thought about creating a field in filemaker that would have all the information from different fields copied into it. But my problem is that the database is constantly changing and I would like the field to automatically aquire the information from other fields. Now how do I do this? When I create a normal text field the automatic filling system doesn't have an option to add values from other fields of the current record? This is a bit urgent so any help is highly appreciated, thanks!

Link to comment
Share on other sites

I don't think there is an easy way to do it. It could be done by entering a value into a global field, then running a script to copy+paste the value into the other fields and generate the result.

I generally avoid running scripts over the web, scripts slow the process down enormously because FMP is single threaded so everything else waits until then script finishes.

The other possible way would be to use tokens to insert the values, but this would require an extra step: person enters search text, clicks button; page is generated that contains the multiple criteria; this page is then used to perform search.

The question is, why?

You then asked "When I create a normal text field the automatic filling system doesn't have an option to add values from other fields of the current record?"

To get text fields in a form to appear with values already entered, type [FMP-Field: fieldname] inside it:

<INPUT TYPE=text NAME=CompanyNAME VALUE="[FMP-Field:CompanyNAME]" SIZE=30>

But to get it to work the page needs to be processed by Web Compaqnion with a RecID specified so it knows which record to use.

Link to comment
Share on other sites

Thanks for your quick reply. What I meant was that I thought about creating an extra field in the database. I would name this field "websearch". Now I'm wondering how can I automate the "websearch" field to automatically copy paste the information from all the other fields of the same record. This way the "websearch" field would have all the information that all the other fields have so I can perform the search on this fields contents. I don't intend to publish the contents of this field on the net as it is. I just want to use this field as the search target to find records with the keywords because I don't want to make separate search fields for every single field. This way I could name the search field in the webpage "websearch" and it would have "access" to the other fields.

Link to comment
Share on other sites

Yeah after browsing the forums I found that you have cross-posted the question to another forum as well as this one. Multiple-posing questions makes it hard for us to answer, causes duplication.

Link to comment
Share on other sites

and, it's against the rules. I got in trouble for it once. Caused the admin's to go crazy on me, they plotted to deny my access for months b/c of my lack of experience. Then I get this anonymous email that threatens to beat me if i cross-post ever again. They voted me off the members list, but i appealed. We're in the middle of a re-count.

but seriously, never pet a burning dog. Trust me, it hurts.

yafreax

Link to comment
Share on other sites

Geez, for a moment there I thought you were serious. It's 9:47 Friday morning here in Sydney after a stormy/humid night... and I haven't had my coffee yet. That's my excuse. ;-)

Link to comment
Share on other sites

It was around 03:00am when I posted my message. I have been quite busy building a commercial online business-to-business catalog. Sorry about posting it in two places but hey, It was 3am and the ******* thing was supposed to be ready the next morning. Anyway I managed to get it to work before the deadline so thanks for your help smile.gif

Link to comment
Share on other sites

This topic is 8571 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.