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 am trying to write a script that will perform a find based on multiple variables. The script should bring in values from a related db. I tried to use the following:

Enter Find Mode[ ]

Set Field [

Set Field and the rest work fine in Find Mode. Think about what you see when you enter Find Mode: empty fields. If you're trying to set one field to the value of a calculation based on another field, you may be disappointed since all fields are blank.

There is one type of field that keeps its value: the global field. If you create some global fields, then you can use Set Field in Browse Mode to store your values. When you switch to Find Mode, you can use Set Field again to get the values from the global fields into the fields you want to search.

  • Author

Ok, I think I am beginning to understand what is going on. I am trying to set one field to the value of a calculation based on another field. I was assuming that even through I was in the find mode, FM still remembered the record it was in and the contents of those fields were available for use in creating the find request. After all Find Mode does not actually clear the the contents of the fields. So any find request you script that depends on the contents of any field will fail except for globals. This seems to be a serious limitation since it limits your ability to use variables in a find request. Is there away to do a search based on multiple variables?

Thanks

Nick

In multiuser mode, globals are local to each user; each user gets his or her own set of global fields. This prevents problems when more than one person tries to access the same global field at once.

Related fields can be on the same layout as standard fields. In Find Mode, all fields visible in any layout are searchable (except globals). This is probably why a Set Field based on a related field doesn't do what you want.

You could probably avoid using globals by using Modify Last Find over and over. Start in Browse Mode. Copy something. Enter Find Mode. Paste. Enter Browse Mode. Copy something else. Modify Last Find. Paste. Enter Browse Mode. Etc. I'd stick with globals.

If you are clever about it, you can probably get away with a single global field. Something like this:

(field1=value1

AND

field2=value2

AND

field3=value3)

OR

(field1=value4

AND

field2=value5)

AND means all field-value pairs are in the same find request. OR indicates a new find request.

  • Author

I forgot to add in the previous post that I am trying to avoid globals for this purpose. I am building a multiuser db, so I want to avoid globals that might be changed by multiple users.

Also, why doesn't FM let you use Set Field in Find to specify a field from a db in the browser mode? Example, why does not the following script work?

Enter Find Mode [ ]

Set Field [

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.