@Dave only can work at nights after work on this, but thanks for checking in. I tried your hint and played around a bit. I came up now with this solution that seems to work well. Thank you so much for your support.
On the first form that adds the task, I added a dynamic event on success with the following actions.
- set the value of my text field “task” in the second form to the value output task_id generated by the query which inserts the task into the database. The link on how to pass values between pages helped me here Post
-
I will then submit my second form which inserts the risk_id and task_id into the second table. The risk_id is provided in a second text field from the query manager. I hide both fields so that they do not show up on the page.
-
During testing I found out that it would be best to reset both forms afterward to ensure a new mitigation action can be added by the user. (in my first tries the last added data did show up in the form when I wanted to add a second mitigation action)
-
I then reload my query that selects the tasks assigned to the currently displayed risk and (4.) close my modal which is use to enter the new mitigation action.
-
I provide a success notification to the customer that the new mitigation action was successfully added.