Jump to content

Script Trigger Icon duplicated


brian rich

This topic is 3860 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 3860 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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