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.

Search on field names, unlimited requests

Featured Replies

I am exploring the possibility for Filemaker to allow the user to perform finds on field names selected from a valuelist with unlimited number of criteria.

I'll try to explain further what I mean.

We have an order items table with the usual fields.

The client wish to not be restricted to predetermined fields when searching, potentially he wants be able to search on anything in the database.

For instance, he wants to know which customer has ordered product A, and not product B, etc.

That's straightforward enough.

In addition he wants to perform finds on many other fields, so he will often end up with 4 or 5 criteria, and some of them would be an omit request.

I think of it as a portal in the header area with a find criteria on each portal row.

The portal goes to a Criteria table (using the Cartesian cross-product operator) that is normally empty, but gets one record for each find criteria by script.

First the user selects which field he wants to search on by a value list that holds all relevant field names in the table.

Then he selects what operator he wants, choosing from the usual "=", "<", etc.

He then enters the value for the criteria in a text field, and finally a check box if the criteria is to be omitted.

He can then press a button and imput another criteria on the next portal row.

I have the portal and related logic in place.

I put the complete find criteria in a variable for parsing and then I hit the wall...

Upon entering Find mode, I can not find a way to use Set Field dynamically.

The Field name I want to search on is in the variable, but Set Field only works on hardcoded fields, or is there a way to set a dynamic field?

Sort of like GetField but the other way around?

I hope this made sense and I am sorry for the lengthy post.

Cheers,

Andreas

"The Field name I want to search on is in the variable, but Set Field only works on hardcoded fields, or is there a way to set a dynamic field?"

Is is referred to as "indirection" and it's not yet possible for the Set Field script step. Be assured, it's an often requested new feature.

The only option will be to hard-code the Set Fields in IF statements.

I personally think you're making a rod to beat yourself with. What you propose would be a cool feature, but IMHO not worth the effort when finds with unlimited requests already exists for NO effort, the only difference being that users will have to enter the criteria into the actual field and not select the field name from a menu.

  • Author

Hello and thanks for your reply.

The solution actually came to me last night.

The Go to Object script step works as long as I first go to a layout populated with every relevant field and every field has an object name identical to its field name. All I need to do then is to insert the criteria into the correct object.

That said, I agree with you completely on your point about entering the criteria directly in the field.

In this case, with so many possible fields to search on, and many of them normally not visible, my solution would serve my client good, i think.

Cheers,

Andreas

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.