Hi Team,
currently need to find a solutions for using the onclick event on the backend of the form to trigger a workflow that that basically updated the sql table , this form is pulling data from
Question
Question
Laserfiche form, trigger workflow and instance of form via custom js button
Replies
I have a few forms that have the ability to view a table or add/edit an sql table. The user has to select from a radio button Add/Edit or View and then separate tables come up. The view only doesn't have a submit button, but the Add/Edit does.
Once the submit button is selected, the business process calls a workflow that updates the database table.
Is there a particular reason you needed a button on the unsubmitted form to initiate the workflow instead of using a workflow service task as part of the Forms process?
I want to use the forum as a view , so they update a table , maybe a specific column like status , to completed , I dont want to use submit , I have a custom js button , called update . Onclick it creates the json string of the amended rows , so i can do a update on the Database , in the workflow . My workflow works , but i am unable to trigger it using that button .
Functionality of that button, when I click the button its creates the string , it should trigger the workflow , and after that it refreshes or reruns the first look up rule which reloads the table with updated data (not the form but the data being rendered) .
I don't think it's possible to do in the way that you want. Katy's method is sound and is the general approach I use as well. Use a workflow to perform SQL upserts. After submission, if you need to redirect back to a new instance of the form to display the updated values for some reason, do that.
That said, if they want real-time data, the solution isn't necessarily to hack it into a LF Form. Start by defining the requirements and then find an appropriate solution for those requirements.
I'm interested in your use case for this.