Jump to content

Combining OR and AND in a link command


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

Recommended Posts

Once again the and/or mixed metaphor.

While this has been discussed many times, I still have not seen an answer which is any better than this: the operators 'and' and 'or' are not usable as you are proposing.

If you look at the cdml reference page "Operator ... Tag Type Variable", you will find a list of operator values. There is even an example of the operator "eq" in a form action. If you attempt this, you will be equally disappointed. (pardon the pun)

My experience is that these tags work well when you are embedding a conditional [fmp-if] on a format file. They work well in such situations as:

[fmp-if: fieldname .eq. '']

display this text

[fmp-else]

display this other text

[/fmp-if]

What you need to learn is how to use the symbols of the database's status tool bar which are offered during a 'find' in the database file. Essentially, I am talking about ==, >=, <=, *, etc. Essentially these can be used in your cdml code, be it form action or link action.

A recent example of this type of code was offered here in a posting started by "helmut" (I don't recall the name of the subject line) in which code for finding in a range was offered. Also there have been several mentions of FileMaker technical reference articles on the exact search (==).

When you learn how to use these symbols in your code, you will be able to solve your problem.

Peace

Keith

Link to comment
Share on other sites

I have a database that contains different products and different vendors for each product.

I am trying to write a link command that looks for

ANY of three values in one field (PRODUCT)

and

ALWAYS one value in another field (VENDOR)

For example:

I would like to create a button, that when pressed, finds all the apples oranges and grapes that the vendor, ACME, has to offer. (but not the bananas or pears, etc.)

The code below just finds all of ACMEs products and ignores the types that I want to retrieve.

http://193.100.100.175/TT/FMPro?-DB=ProductsForSale.fp5&-Format=search_results.htm&PRODUCT=apple+orange=grape&-LOP=OR&-Op=eq&VENDOR=ACME&-Find=

Deleting the "-OP=eq" in front of my vendor gives me the same results.

Putting the VENDOR part before the PRODUCTS part of the command still gives the same results.

If I delete the whole section "&-Op=eq&VENDOR=ACME" then the "or" operator seems to work just fine (I get the right fruits) but I get them from ALL vendors, not just ACME.

Help?!

Link to comment
Share on other sites

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