Jump to content

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

Recommended Posts

Posted

Does anyone know how to do a "Global Search" of a database via the web?

I want to create 1 "Search" field that will check every field in that database (or layout) for whatever the criteria and display it back to the user.

Not quite sure how to tackle that one.

Any help would be greatly appreciated!

Thanks!

~Addam~

Posted

Addam,

This is a bit of hack work however you will end-up with a "-lop" of "OR" and a list of all the fields as <input> tags. You can then use Javascript to fill-in the values of all the fields to be searched.

Another method is to create a Calculation field which concatenates all of the fields to be searched. You would then use a "-op" of "Contains" for the search on that field.

Hope this helps.

Garry

Posted

COOL! Thanks for the reply!

Ok...

I seem to be in the right direction...

Now reg. the calculation field...

It is:

webFind - FieldNames (Status(CurrentDatabase), "profile")

This will give me the field names in the database.

Should the HTML look like this:

<input type="hidden" name=" [FMP-Field: webFind]" >

or am I missing something here. (BTW, this does not work).

Thanks!

~Addam~

Posted

Addam,

In the Calculation field I would have something like this:

webFind - myfield1 & myfield2 & myotherfield .... etc

An efficient method, of using FieldNames(), may exist however, I haven't used that function.

The html/cdml would look like this:

<input type="hidden" name="-op" value="cn">

Enter a String to search for:<input type="text" name="webFind" value="">

<input type="submit" name="-find" value="Find String">

Hope this helps.

Garry

  • 3 weeks later...

This topic is 8120 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.