ljensen1 Posted December 4, 2002 Posted December 4, 2002 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?
Garry Claridge Posted December 4, 2002 Posted December 4, 2002 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
ljensen1 Posted December 9, 2002 Author Posted December 9, 2002 Thanks for the suggestion. I tried it, but no luck. Any other ideas?
Steve T. Posted December 10, 2002 Posted December 10, 2002 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.
Garry Claridge Posted December 10, 2002 Posted December 10, 2002 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
ljensen1 Posted December 11, 2002 Author Posted December 11, 2002 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?
Steve T. Posted December 11, 2002 Posted December 11, 2002 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.
Recommended Posts
This topic is 8087 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 accountSign in
Already have an account? Sign in here.
Sign In Now