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.

Way to fire a script/script trigger after manually using the Show All Records command

Featured Replies

Howdy all,

I have a script that performs a Find using the OnRecordLoad script trigger. However, if a user manually uses the Show All Records command, the script trigger won't fire because there's no trigger; a record isn't loaded until the user clicks on a field.

Is there a means of firing the script after such a circumstance?

 

Cheers,

Rich

55 minutes ago, Rich S said:

a record isn't loaded until the user clicks on a field.

I don't think that's a correct statement. An OnRecordLoad script trigger will act when a new record is loaded. Calling Show All Records does NOT load a new record, unless you started with an empty found set. Clicking on a field is entirely irrelevant here.

What is the purpose behind this? It sounds like you are actually trying to solve some other problem - something to do with record access privileges, possibly?

 

  • Author

Better to illustrate than use verbose prose. : )

In the attached vid (same vid, one's .mov and the other .mp4), I enter Find mode and in the Order Number field, enter "Stuart." The found records appear...and notice under the Jobs List heading a value list--through a calculation, it looks at what Status values are used in the found set and "ticks the boxes."

Next, I enter Command +J (Show all records.) The value list at the top doesn't automatically update with the appropriate ticked boxes, of which four out of the six should be ticked. When I click in the Order Number field, the ticked boxes appear as they should. 

As an aside, the two fields used to generate the "used" Status list are:

Order Status (calc) ORDER_FORM_CHILD, = UniqueValues (OrderStatus__lxt)

Order Status (summary) = List of OrderStatus (text)

Screen Recording 2024-10-04 at 10.43.13 AM.mov

Edited by Rich S

1 hour ago, Rich S said:

Next, I enter Command +J (Show all records.) The value list at the top doesn't automatically update with the appropriate ticked boxes

Does the attached file behave as you would expect?

 

FoundValues.fmp12

  • Author

Could work. Thanks! It'll take me a while to figure out how the $letter variable works. 

2 minutes ago, Rich S said:

how the $letter variable works

That's irrelevant to what the demo is designed to show. The point is that after showing all records the list of found values is automatically updated. Without any script trigger or any script at all.

 

  • Author

Indeed, but it's important to me to learn how things work, so knowing the how's and why's of why this code does that makes me a better codergotta admire your wizardry. : D

Edited by Rich S

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.