0

Run a script to Form open or Form Close

I would like to run a script when a form opens and/or when a form closes

This would not be dependant on form creation or modification.

At present (and not sure if there will ever be!) there is not the facility to do this.

I have tried dozens of work arounds including putting scripts in globals but alas I can't find a way to achieve this and Ninox say ... not even on their radar....

example - One of my users goes into a form. The form has say 5 tabs - They have changed the tab to what info they need to see but have NOT updated any information in anyway. They exit the form - also leaving it on tab 5.

Whereas - ideally I would like it to "on close form" change it back to the main form (page1). Other uses leave it on tab 4 (the job invoicing page).

This and often occurring issue (not a major issue I agree but !!) but I have many things that I could run better if you could trigger a script on form open or close

any suggestions welcomed.

3 replies

null
    • Paul_Chappell
    • 2 yrs ago
    • Reported - view

    On a Tab you have "Trigger before view" and "Trigger after hide" scripts that allow you to do certain things before and after a tab is shown.  You could use this to control if a user has to start on a particular tab before they can edit fields on other tabs.

      • Mel_Charles
      • 2 yrs ago
      • Reported - view

      Paul Chappell Yes Paul aware of those and using at the moment and they are very useful but they do have limitations . As I need to trigger certain various events when the whole form is opened or closed  before a a particular tab is viewed etc to trigger an action.

      But thanks for the input

      • Paul_Chappell
      • 2 yrs ago
      • Reported - view

      Mel Charles I'd need more information about what you are trying to do, but the Tab triggers combined with the Table "Trigger after update" script should allow you to run script when any tab is opened, (which happens automatically when a form is opened).  Running script when a record is closed is more difficult because a form doesn't have to be manually closed.  However, you could run a script relating to a particular table when a different table is opened. 

Content aside

  • 2 yrs agoLast active
  • 3Replies
  • 180Views
  • 2 Following