Jump 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.

Featured Replies

:) I'm using FX.php with FM7. I'm trying to set up a combination and/or Find and I can't come up with coding that works.

These are my parameters:

$search_resource->AddDBParam('Keywords',$Keywords);

$search_resource->AddDBParam('Title',$Title);

$search_resource->AddDBParam('Located',"CALS");

$search_resource->AddDBParam('Located',"CCS");

I want to find all records that have the entered Keywords and Title, AND that are located either in CALS or in CCS. (The user can choose to search for only CCS, only CALS, or both.

Any ideas how I can accomplish this?

Thanks!

  • Author

I've been doing more research and it seems that FM won't let me do a combined and/or search from the web. I've run across two possible solutions:

1) use scripts within FileMaker to do the search

2) use more than one web query and combine the results

Questions:

- Can I use option 1 if I don't have the developer version of FM7? How do I pass a parameter to a script in the database?

- For option 2, how do you combine search results? And how do you retain the ability to "linkNext", etc?

Go here:

http://sixfriedrice.com/wp/blog/blog-archive

and you'll see four articles on the 'The Secret Life of Find Mode'. Very good,

Norman

  • Author

Thanks, but my problem is not doing a Find from the database. I can do it that way easily. I'm trying to figure out how to do it over the web using FX.php. I've even tried using "neq" as part of it:

$search_resource->AddDBPara('Keywords',$Keywords);

$search_resource->AddDBParam('Title',$Title);

$search_resource->AddDBParam("Located","CALS","neq");

- but that just pulls all the records. Seems I can't combine "neq" with another type of operator and get a correct find.

Well, you can try using:

$search_resource->AddD BParam('Keywords',$Keywor ds);

$search_resource->AddD BParam('Title',$Title);

$search_resource->AddD BParam('Located',"CALS");

$search_resource->AddD BParam('Located',"CCS");

$search_resource->addDBParam('-lop','or');

And that will return records where any of those criteria are true.

Your only other option if you need an "and" for some criteria and an "or" for others is to pass the request to FM via a script and parameters, execute a script and return the RecordID's or Primary Key's of all the records that match that request in a simple delimited array... then dynamically generate a second request in php and do an or search on all of those.

  • Author

Do you know if I can set that up without the developer version of FileMaker? How do I pass a web-based parameter to a script within FileMaker?

The developer version has nothing to do with this, script parameters are a standard feature.

You pass the parameters in via FX (don't ask me how as I'm only proficient with the PHP API), then within your fm script you retrieve them using: Get(ScriptParameter).

At the end of the script, you would pass all the id's back by using the exit script step and specifying the delimited information as the script result.

Finally you would retrieve that script result via FX (again, don't ask how, but i'm 95% sure its possible) and perform the necessary searches.

Anyway, for more help with FM/PHP interaction, try this forum: http://fmwebschool.com/frm

  • Author

Thanks. I'll take a look over there.

Create an account or sign in to comment

Important Information

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

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.