0

Trigger on Open....

Is there any way to trigger actions on open a record? (there are on create and on update)

Background: I am implementing a "cancel / undo" option where I want to rollback the values in case of undo/cancel....

I am basically creating a duplicate record with a "backup" but I was looking forward to having a more elegant option....

 

thoughts?

cheers

Luis

9replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 3 mths ago
    • Reported - view

    There is not a trigger on Open at the table level. There is one at the DB level.

    Like
  • You could use the 'trigger before' view of the TAB element.

    Like 1
      • Luis
      • Luis
      • 3 mths ago
      • Reported - view

      RoSoft_Steven 

      that is an idea yes! 

      thanks 🙏🏾 

      Like
  • RoSoft_Steven This is a good idea, as I have longed since wanted an event to trigger on OpenForm or CloseForm (without having to update something)

    Your idea works on all tabs after the main page on the form. However this replies on triggering that tab. Ideally I want it on the main first page, which of course by default the tab shown is the form name itself and you can't append a trigger before view on ... aha I though - I know I will create a tab and drag it all the way to the top of the edit list and append the trigger to that tab.

    Great I can add the simple script (DisplayMenu := 1)  Nope it don't work (unless I exit the db and then go back in)

    Only works on 2nd tab and after 😢

    Like
    • Mel Charles 

      Strange, this must be a bug... Does it continue to work after you reopened your database in the first tab or do you have to reopen every time?

      Image above is to do what MEL describes (creating a first own TAB element)

      Steven

      Like
  • re first tab - Found it also works if you go into the form then close it then go back in... but not in all cases - weird !

    Like 1
  • RoSoft_Steven No mate- on the first tab it won't trigger unless as stated you go in firm (not worked

    exit then go in again (works) same for every record

    also tried to ur script on global - but its not having it (probably trying to do it wrong tho...)

    see sample (set it to alter MODdate cell to today)

    so open form (nothing)

    close the form\

    then reopen

    Hey presto (works)

    No form update taken place! other than the trigger to set today in ModDate

    as you can see I added a tab to replace the main form name

    Form is called JobDockets by default (new tab Main)

    so close but .......

    Like
  • I've emailed support to see what they say on this having to go into the form twice before it will trigger

    Like
    • Mel Charles thanks Mel 👍

      Like
Like Follow
  • 3 mths agoLast active
  • 9Replies
  • 102Views
  • 4 Following