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

  • Newbies

Hi there,

at first I was struggling to find some data which I knew was present and couldn't figure out why...

Data in text field (real example):

  • A 0111
  • B0111
  • B0116
  • TZ0113
  • [...]

Search string (quotes not part of search):

"0111" finds "A 0111" but not "B0111" etc.

But I figured out how to adjust my search so FileMaker will pick up these records accordingly by wrapping it in stars like *TERM* so it performs partial matching:

"*0111*" finds "A 0111" and "B0111"

Now my question is: How can make this the standard search mode / feature without extensively writing scripts for every layout?

I am working with a search layout which includes a lot of fields and I would like to just be able to set "partial search" as default for selected fields or – if that's not possible – for all fields on the search layout, knowing that this can be achieved by using a search script which wraps every input in "*" but that seems kind of over the top.

Thanks for your input!

Hi evance and welcome to the FM Forums,

IIUC, FileMaker will remember a search performed manually. So perform your search manually and then immediately create the script Perform Find.

Lee

 

  • Author
  • Newbies

Hi Lee,

thanks for welcoming me and replying to the question!

11 minutes ago, Lee Smith said:

So perform your search manually and then immediately create the script Perform Find.

Guess this won't be feasible as a server-sided approach, or how do you mean that? I'd need a general solution for all users / devices regardless of which field is being searched in, I thought of a "layout-based" setting...?

It's OK if this cannot be done natively and I have to use some script step(s) to do so but I wanted to inquire first.

  • Author
  • Newbies

Just for reference's sake / if anybody else is searching for this:

I've put together a simple script which is being called by a script trigger on my input fields in search mode – I adjust the user input so that FileMaker uses partial search if applicable (single word, string not empty).

Set Variable [ $field_context; Value:Get ( ActiveFieldTableName ) ]
Set Variable [ $field_name; Value:Get ( ActiveFieldName ) ]
Set Variable [ $field_content; Value:Get ( ActiveFieldContents ) ]
Set Variable [ $field_length; Value:Length ( $field_content ) ]
Set Variable [ $field_wordcount; Value:WordCount ( $field_content ) ]
Set Field By Name [ $field_context & "::" & $field_name; If ( $field_length = 0 OR $field_wordcount > 1;
$field_content; "*" & $field_content & "*" ) ]

Regards!

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.