Need your help with Risk Management Application questions regarding SQL Statements and Parameters

Hi all,

I have started using Wappler a few weeks ago and I am quite new to programming. My aim is to develop a quality management application and I have started with the area of risk management. For this I have developed a database structure with risks, each having some master data like name, possible impact (text) and chances, etc.

I also have created tables for risk scores as risks have to be evaluated over time and impact and probability can change. I was able to develop an overview page with search, deleted, add functionality, and a detailed page for each risk, reached by a link providing the risk id via URL parameter.

At the risk details page, I use the query manager to show the details for each risk as well as the scores.


My first question here is how I can create the INSERT SQL Statement when adding a new risk score that the risk score is calculated automatically into the column risk_score by simple multiplication of the columns risk_probability and risk_impact (e.g. first line 3 x 4 = 12)

I then also want to assign different tasks to a risk to perform risk mitigation.


I have an extra table assigning a task to a risk as my plan is to use tasks also later in the application for other areas, not only risks.
riskmitigation
I was able to create an insert table to add new tasks but I am not sure how I can create a query that creates a new task and at the same time assigns the new task to the correct riskid in the risk_mitigation table using the URL parameter (in the example risk id=7) so that the task shows up in the correct risk as mitigation.
I would appreciate any tips or links to resources or feedback in general. So far I have read a lot of the documentation, watched how-to videos and searched in the forum. It helped me a lot and I was able to solve many other problems this way. I am also a heavy user of LinkedIn Learning for videos on databases and SQL.

Have a good Weekend!

Community Page
Last updated: