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.

Script Trigger Icon duplicated

Featured Replies

When a field has a script trigger attached to it and you view the field in layout mode, an icon is displayed to show that the field has a script trigger attached.  Why should this icon appear twice, and what does this mean?

 

post-53652-0-26105600-1367399440_thumb.p

 

I attach an image which shows the duplicated icon and the script trigger dialog for the field.

 

The layout is in a database hosted on an FMP11 Server Advanced installation, and the layout is displayed in an FMP11 Advanced client - this installation is Windows based. The field itself is a date field from a related external file hosted on the same server.  Field entry is not allowed in browse or find mode. The field is set as a button - the script attched to the button controls checks a number of conditions and if these conditions are fulfilled, the script will place the cursor in the field for user entry.  The control style of the field is a drop-down calendar. The trigger script runs using the OnObjectSave event in browse mode - the actual script triggered is located in the external database.

 

I have tried setting the field up from scratch on the same layout, and only get the icon once.

 

A backup clone of the database comes up clean if you run it through a recover procedure.

 

A DDR only shows a single script attached to the field on that layout.

 

The issue is of interest because the original trigger script attached to the field apparently 'vanished' and we have had to add it again.

 

Thanks

 

Brian

I think this is a small bug. It shouldn't have any bearing on functionality at all but rather just a cosmetic bug. IIRC I had noticed that it happened when the object was turned into a button, you had an additional indicator on for something like conditional formatting, and then respecified the script trigger.

  • 5 months later...
  • Author

Had cause to revisit this field, as the trigger script appeared to be misbehaving.

 

This isn't a bug, it seems to mean something although I'm not sure what.

 

The field in question has a button script attached to it, and also has an on-save trigger script. The button script is supposed to manage date changes (recording an user provided reason for the change) and to calculate a set of other dependant dates. The trigger script is for when the field has a date entered for the first time (no reason needed - just calculate the dependant dates.)

 

If you set the trigger script first, then add the button script, only a single trigger script icon is visible in layout mode.  If you revisit the Set trigger script dialog, there is a now dash against the trigger event checkbox that the trigger script links to, rather than a tick.

 

If you now click again on the event checkbox so it becomes a tick, then two script icons will appear in layout mode.

 

Thiis suggests that both scripts are now monitored for triggers - if so, what is the button script event?  What order do the scripts trigger in?

 

Brian

When you set up a field as a button, you are creating a new grouped object. This is why you initially see the dash in the Set Script Triggers window; the trigger is applied only to a member of the inspected grouped object, not to the entire group.

 

Clicking twice on the dash changes it to a checkmark, indicating that the script trigger is now attached to all members of the group. I don't think it matters much in your case, since attaching an OnSave trigger to a button is meaningless, but if definitely makes a difference when you group two fields with different script triggers, for example. In any case, I wouldn't do it (i.e. click on the dash) unless I meant it.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.