Jump to content

Finding multiple exact values for one field


gorlok
 Share

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

Recommended Posts

  • Newbies

Hello,

I cannot figure out how to compose a particular FM query in a URL.

Suppose I have a database of names and addresses. I want to find all the "Smith's" that live in NY or NJ, but not any other states. A SQL-esque query might look like this: SELCT * FROM mydatabase WHERE lastname=smith AND (state=ny OR state=nj)

The FM query I am trying to use looks like this:

http://myserver.com/fmpro? [snipped...] &name=smith&state=NY&state=NJ&-find

If I insert "-lop=and" anywhere in the query, I get NO records found because there are no records that have both NJ and NY as the state. If I include "-lop=or," I get nearly all the records that contain "smith" from any state.

I'm thinking that what I want to do isn't possible in FM with custom web publishing, because the logical operator (-lop) seems like it must apply to the entire query (all values are joined as AND or OR, but not some with AND and others with OR).

Thanks!

FileMaker Version: 6

Platform: Windows 2000

Link to comment
Share on other sites

This has been answered. Look in the Sample Files forum for the demonstration CDML -LOP values

There is also a demonstration on the CDML -op values and symbols which you may or may not find useful.

It is written in Pro5.x. You will need to drag and drop.

Link to comment
Share on other sites

  • Newbies

Unable - thanks for your reply; I have searched and searched and not found the answer in the forums. The sample files for -LOP and -op do not address this issue; this thread poses my question exactly:

http://www.fmforums.com/threads/showflat.php?Cat=0&Board=UBB22&Number=20849&Forum=c9&Words=%2Brefine&Searchpage=0&Limit=500&Main=20842&Search=true&where=bodysub&Name=&daterange=1&newerval=5&newertype=y&olderval=&oldertype=&bodyprev=#Post20849

The issue of selecting a range of values is addressed, but not the issue of performing one find that returns records that have either of two values for a particular field, while excluding records that have all other values for that field.

I'm looking for the web companion equivlent of adding multiple find requests. In my original example, the first request would be name=smith, state=ny, and the second would be name=smith, state=nj.

Link to comment
Share on other sites

This topic is 6485 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
 Share

×
×
  • Create New...

Important Information

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