Jump to content
  • 0

Execute Trigger From Button On Datapage


kpcollier

Question

Alright... obviously, you can't just have a button out there that a user can click to run a trigger on a table. However, I'm trying to simulate something like this...

I have a Certificates Report, which displays information related to the certificates that our employees have. These certificates have an expiration date and an expiry status. 

We have about 8 certificates that each employee renews every year at our annual safety meeting. 8 certificates each x our amount of employees is a lot of work to manually update from a tabular report.

I'm trying to figure out a way to let one of my users update specific Certificates in my table to reflect a new date and a Active status with little effort. The perfect workflow would be to have a button that would run a trigger when clicked. Building the trigger that updates the fields on specific certificates is not a problem for me, but getting the trigger to execute from the front end - on a tabular report - seems challenging.

I would like to not have to use another datapage, if possible... 

If any of you have solved a similar problem another way, I am open to suggestions.

Thanks!

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi @kpcollier,

In order to get trigger to execute, you will have to either insert/update/delete some record, and on Tabular Report, simplest way is to use update with inline/bulk/grid edit options.

As for some other way, I am thinking that it might be possible to create a new Submission Form, where all fields will be hidden, except for 'Submit' button (which can be customized). Then, you can use that deployed Submission Form (as iFrame directly in Report, or otherwise) in Report just to insert something into any table, on which you will have your trigger set.

Link to comment
Share on other sites

  • 0

My idea still involves an extra datapage. As @KlisaN137 said, the trigger will only activates when there are activities on the table such as insert/update/delete. What I did on my end is that I created a submission form that is set to insert data on dummy table. The submission form is also set to capture data from external parameters and is set to autosubmit and autoclose.  

On the tabular report, I have created a button that will create a pop-up form of the submission form, I passed the data that I needed there as a parameter.  Then on the Dummy table, there is where I set the triggers (insert trigger), that I wanted to do.

In the end, it still involves a datapage.

 

Link to comment
Share on other sites

  • 0

@kpcollier I think you can modify the code provided here to create your desired workflow. What I'm proposing would be adding a yes/no field on your table that will serve as checker for updates and in tandem with that would be a trigger that will run on update, check if the updated record has a checkbox that is set to yes and run your trigger, At the end of that trigger you would need to reset the value of the checkbox to "unchecked" so you can click the button again and it will comply with the condition inside the trigger.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...