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

Hi there,

 

I'm experiencing an issue with script trigger not working when a fresh layout is loaded.

 

Here are a number of examples:

 

OnModify script trigger on a drop down list

 

The user goes to a new layout

they select a drop down field which has a script trigger attached to it

the first time it's selected nothing happens

the second time onwards it begins to work

 

OnObjectModify script trigger of a edit box being used as a filter

 

The user goes to a new layout

they type 1 character in the field with eh script trigger

nothing happens

they type a second character and the script triggers

the field is cleared

One character is typed

The script triggers

 

It seems that for some reason the script trigger must be triggered two times before it will work, after that it works every time.

 

This only happens the when a new layout is loaded.

 

I have experienced this both on windows and filemaker go

 

Has anyone else had this issue and was there a work around?

 

Users don't understand why it's not working the first time and often just stop the process.

 

In this document...

http://help.filemaker.com/app/answers/detail/a_id/7465/~/understanding-and-using-script-triggers

The first bullet point in Additional information reads "Script triggers execute based on changes or actions performed on layouts and layout objects directly."

This suggests that the reactions you are seeing are how the OOM trigger is supposed to perform.

The object is not actually modified until you type the second character.

Just my 2cents

That's not my experience though.  Obviously onModify only runs when you actually modify something so selecting the same value from a dropdown as was already in the field is not going to trigger it.  But typing a new character in the field always and consistently runs the OnModify for me.

 

You mention that on the 2nd character type the field is cleared and only one character shows?  That makes me think that you have other triggers going on too.  What other ones are active on that layout and that field (onLayoutKeystroke / ObjectKeystroke / recordLoad, ObjectEnter,...)?

2c withdrawn. No warranty or guarantee specified or implied... :grad: by Wim

  • Author

Thanks for your input,

 

The second example is a little more complicated - so I'll stick with a simple scenario

 

Goal: Filter a portal with Value list options in a global (drop down) field.

 

In General it all works. it's only when the layout is first loaded and the filter is triggered fro the very first time that it doesn't work.

 

I have enabled the script debugger and I can see that the script is indeed triggering and completing but the portal isn't filtered. 

 

I have tried both of the following:

 

Navigating to the layout, then triggered the filter - no change in filtering

 

Switch from layout mode to browse mode - no change in filtering

 

The script is triggered, but it doesn't actually effect the portal filtering, every time I run it after the first time trigger it works without fail.

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.