Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Automatically run a script


Database Designs of Ohio, Inc.

Recommended Posts

I have a date field that is now defined as a button. When I click it a calendar pops up for me to enter the date. Is there a way for this script to run without having to click on the field. In other words, when I tab to the date field, I want my calendar script to run. Can this be done?

Link to comment
Share on other sites

Hi,

FileMaker doesn't have an 'on focus' triggerring system, and to the best of my knowledge there are no plug-ins available at this point that provide that functionality.

 

As a result, the only type of automatic pop-up system that is available is the standard pop-up menu/list option.

 

Perhaps your best bet would be to look at assigning a hot-key (eg ctrl-0 to ctrl-9 etc) to the script that is attached to your button, so that users have the option to trigger it from they keyboard if they prefer not to reach for the mouse.

 

Sorry the news is not better... :rolleyes:

Link to comment
Share on other sites

If the field you are tabbing into is a field that has a valuelist script attched to it. (Search for popup list script , there are many on this site) When you tab out of the field it may invoke the script. But I have always done it by clicking on the field and choosing an item from the loist before proceeding with the script. What the heck , give it a try.

Link to comment
Share on other sites

Sorry to say I agree with Cobalt. You can not invoke a script by tabbing throuogh the field. It must be clicked on to start script and must choose an option by clicking to continue script. Sorry frown.gif

Link to comment
Share on other sites

Troi has a plug in with which you can assign actions to take place upon leaving a field (tabbing). So you could assign the button click to take place when you tab from the prior field to the field which is designed as a button. This will probably do the trick.

 

Check the Trol Website. The plugin is cheap and the people at Troi are helpful and super at customer assistance.

 

Tom

Link to comment
Share on other sites

I'm afraid that's not quite correct, Tom.

 

I'm familiar with the Troi plug-ins and use a number of them frequently. The one which you are referring to is Troi Activator - and it is indeed an excellent product - but it does not do quite what you are suggesting. In fact the use you're proposing would be a mis-application of Activator.

 

Activator can be used to trigger a script when a field is changed - by adding its function call to the validation-by-calculation specification for a field. So far so good.

 

However a field is not validated when you tab to leave it unless its data has been entered/changed. Even turning the 'Validate only if field has been modified' option off will not help in this case, because that still only validates if a modification has taken place somewhere on the current record - and such a validation does not occur in any case until you exit the record.

 

DDOI wants the script to run in order to *enable* the field modification of the date field - but the appearance of the calendar, if the plug-in suggestion were used - should not be contingent on the immediately preceding field in the tab order having been modified by the user. Moreover, with such a set-up in place, the calendar pop-up would occur whenever the user left the previous field (after changing it) by any means - not just by tabbing. So, for example, if they changed the previous field and then moved to the next record, the calendar pop-up would be invoked.

 

Thus, in ordinary use, a plug-in based approach using Activator - or, for that matter, any of the other script triggering plug-ins on the market at present - would be haphazard at best. It would fail to show the pop-up on occasions when it is expected, but would display it as an unpleasant 'surprise' at other times when it is not required and not appropriate. I'm afraid that DDOI's users might think this was a bit more like a practical joke than a solution! wink.gif

Link to comment
Share on other sites

Ray!

 

Thank you for the elucidation. I stand corrected. Having not used Activator, I was not aware that it required changing the activated field.

 

Tom

Link to comment
Share on other sites

Thank you all for your input. I think I'll just have them click on the field. No big deal. Thanks again.

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use