Jump to content
Server Maintenance This Week. ×

Complex finds

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

Recommended Posts

I'm having trouble figuring out how to do a complex find with CDML. I have a web page where users can enter find criteria in a number of different fields.

Here's an example of what I'm having trouble with:

- Text field called "Name"

- Checkbox field called "Class" with the following options: Freshman, Sophomore, Junior, Senior.

The user needs to find all Freshman and Sophomores with the name "Smith." User enters "Smith" in the Name field and checks off "Freshman" and "Sophomore," and clicks Find.

If I use the -LOP "AND" I get a message of "No Records Found." If I use the -LOP "OR", I get records for Freshman and Sophomores who aren't named "Smith", etc.

This would be a multiple request Find if I was using FileMaker directly. Is there any way to do this kind of Find with CDML?

Link to comment
Share on other sites

I don't know of a way to do what you want, but I think it's out there somewhere. In the mean time, consider workarounds...

"Off the top my head" for what it's worth, maybe you could:

- just find the name and then sort by class

- store the input values as tokens or global variables and have a script perform the find (study FMP scripts thru web, though)

- search for Smith but show/hide results as desired based on class "search" criteria

- using input values as tokens, run 4 inline actions on the results page (one for each class)

No, I don't know if any of these are even possible and I mentioned tokens twice though have never used them myself.

Post your solution if you find one. Good luck.

Link to comment
Share on other sites

Thanks for the suggestions. I forgot to mention I'm using 4.3, so that really limits what I can do. We're supposed to be upgrading to 6.0, but it's taking a while. I can't do Inlines, and I believe I'm limited to 1 Token. Are Global Variables something in 6.0, or is that JavaScript?

Link to comment
Share on other sites

Sorry, I guess I meant "global fields" instead of variables... and global fields are regular fields that are only stored 1 time in your db but every record has access to. A global field is good for something like sales tax, constants, and things you don't really need to store (like temporary values).

We have 5.5-Unlimited but really want 6.0's cdml_code folder that let's you hide your code from snoopers. Just remember that when you leave 4.x, you have to get the Unlimited version if you're going to serve out to the masses.

Link to comment
Share on other sites

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