December 4, 200223 yr 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?
December 4, 200223 yr Leave the "-lop" as "AND", and try the "Class" with "-op" equals "cn". I haven't tried this, however it maybe worth a go. Good Luck. Garry
December 10, 200223 yr 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.
December 10, 200223 yr You could use a combination of Tokens and InlineActions. Each InlineAction would search on the "Name" and each of the selected "Classes" Good Luck. Garry
December 11, 200223 yr Author 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?
December 11, 200223 yr 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.
Create an account or sign in to comment