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.

Find script

Featured Replies

Hi,

I would like to create a script that would perform a find whose criteria would be was is currently in a given field on the current record. Is this possible?

Thanks.

Something like;

Freeze Window

Set Variable [ $Find; YourFindField ]

Enter Find Mode [ ]

Set Field [ YourFindField; $Find ]

Perform Find [ ]

HTH

Lee

BTW you dont really need a script for this. You can just select the field that you want, right click and then choose 'Find MAtching Records'

  • Author

It keeps telling me that ''No records match this set of find requests'' but this can't be true because if I go to find mode myself and type in a value, it finds the corresponding records. Any ideas?

Thanks.

Paste a copy of your script here.

  • Author

Here it is. The reason I can't simply right-click and select "Find matching records" is because I want the search to be performed on another layout.

Freeze Window

Set Variable [$Find; Value:equipment_list::el_equip_name]

Go to Layout ["Inspection Issues" (inspection_issues)]

Enter Find Mode []

Set Field [equipment_list::el_equip_name; "$Find"]

Perform Find []

Thanks.

Maybe it's my tired eyes, but I don't see an error.

Why not use Script Debuger step through your script to see what is isn't doing.

Lee

[color:red]p.s.

You can also post a copy of your file here if you want

Before you do, remove any confidential information, or post a no record clone.

Edited by Guest
p.s.

Are you sure about this:

Freeze Window

Set Variable [$Find; Value:equipment_list::el_equip_name]

Go to Layout ["Inspection Issues" (inspection_issues)]

Enter Find Mode []

Set Field [[color:red]equipment_list::el_equip_name; "$Find"]

Perform Find []

You've switched to a new layout and new context, but the field that you reference is in the old context.

  • Author

Please explain.

Thanks

Also...

Set Field [equipment_list::el_equip_name; [color:red]"$Find"]

Get rid of the quotes.

What Barbara was trying to point out was that your script goes to a layout based on inspection_issues but you are searching for a value in the equipment_list table. Unless they are somehow related, you will not return the results that you want.

Nice catch John, I knew there was something that my eyes were not seeing.

Hey [color:red]TDavidson, when you use a variable, it is like using a field, and you don't need to enclose it in quotes, i.e. just $Find, not "$Find".

I think that your File Structure needs to be explained. If the two layout are two different Files, or TOs, you need to have a relationship in order for the script return anything. If on the other hand, they are both layouts in one TO, then you don't even have to change layouts, because the Set Field Script Step doesn't require the Field to be on the current layout, and you could then move the Go To Layout to after the Find has been performed.

HTH

Lee

  • Author

I got rid of the quotes and it now works fine. There is a relationship between both table occurences so that shouldn't be a problem.

Thank you so much for your help guys!

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.