Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Complex finds

Featured Replies

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?

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

  • Author

Thanks for the suggestion. I tried it, but no luck. Any other ideas?

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.

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

  • 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?

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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.