Hello,
I am new to both this forum and a lot of coding. I am working on building a risk management type of application that will have several similar tables. These tables each will have fields that will calculate risk (field1+field2+field3=field4) then when controls are implemented to alleviate risk (field5+field6+field7=field 10) then a subtotal running at the bottom of the page. Very similar to the orders-dv lesson on Udemy. My question is, instead of having to edit several different files, e.g., table1-dv.js, table2-dv.js, table3-dv.js, etc, can I have one dv-js file that all these tables can access to perform the calculation? I perceive depending on the client having many tables, more than 20 for sure. Thanks in advance.
Re-use a dv.js file
Re: Re-use a dv.js file
As far as I have understood your question you are planning a non-normalized database model. From my experience you definately should avoid this.
You do not need so many tables:
Additionally I would create a Likelihoods lookup-table and a Impacts lookup-table, so in every evaluation you will be able to select the likelihood and the possible impact from a dropdown. Your can even have colors (traffic-lighting) and/or icons for both dropdowns. Users of Risk-Management tools are used to it.
And I would add at least a Categories-table (or Organizational Units-table) to group the risks.
With this kind of "normalized" model you can easily add Measures (Tasks), Notes, Evidence (e.g. PDF-documents), History and much more later on.
I hope this helps!
Regards,
Jan
PS: This is an example of a dropdown having colored and css-styled content with icons: https://forums.appgini.com/phpbb/viewto ... down#p9284
You can also show probabilities and impacts in red, yellow, green for example.
PPS: You can see some of my AppGini projects and UI-enhancements here:
https://www.bizzworxx.de/en/appgini-improvements/
You do not need so many tables:
- If there is one database per client, you only need a Risks-Table and a Evaluations-Table in which each Evaluation is related to a single Risk.
- If there are multiple clients per database, you will need a Clients-table, a Risks-Table and a Evaluations-Table in which each Evaluation is related to a Risk AND a Client.
Additionally I would create a Likelihoods lookup-table and a Impacts lookup-table, so in every evaluation you will be able to select the likelihood and the possible impact from a dropdown. Your can even have colors (traffic-lighting) and/or icons for both dropdowns. Users of Risk-Management tools are used to it.
And I would add at least a Categories-table (or Organizational Units-table) to group the risks.
With this kind of "normalized" model you can easily add Measures (Tasks), Notes, Evidence (e.g. PDF-documents), History and much more later on.
I hope this helps!
Regards,
Jan
PS: This is an example of a dropdown having colored and css-styled content with icons: https://forums.appgini.com/phpbb/viewto ... down#p9284
You can also show probabilities and impacts in red, yellow, green for example.
PPS: You can see some of my AppGini projects and UI-enhancements here:
https://www.bizzworxx.de/en/appgini-improvements/
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Re-use a dv.js file
Hi Jan,
Thanks for the info. I guess I should be more specific. The project would be copied, renamed and re-used in different areas/servers, so one DB per client organization. It is a hybrid of both risk management and health and safety management. So the part I am interested in is to create a job hazard analysis process where the job is broken down into tasks and then evaluated for risk and reevaluated once controls are established. Each unique position, e.g. carpenter, would require it's own analysis but each position would use the same process. Am I making sense? I can make a bloated project with a table-dv.js etc for each but I am looking to avoid that.
Thanks for the info. I guess I should be more specific. The project would be copied, renamed and re-used in different areas/servers, so one DB per client organization. It is a hybrid of both risk management and health and safety management. So the part I am interested in is to create a job hazard analysis process where the job is broken down into tasks and then evaluated for risk and reevaluated once controls are established. Each unique position, e.g. carpenter, would require it's own analysis but each position would use the same process. Am I making sense? I can make a bloated project with a table-dv.js etc for each but I am looking to avoid that.
Re: Re-use a dv.js file
Hi,
maybe you can use the hooks/footer-extras.php to implement your js. You can check in which DV you are and act acordingly.
maybe you can use the hooks/footer-extras.php to implement your js. You can check in which DV you are and act acordingly.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Re-use a dv.js file
Thanks, I decided to use a single table for the process but am now having issues with narrowing the view. I have it somewhat narrowed by department (Groups in the Admin section) but need to narrow it further. I have posted something in the advanced section, Hooks as I think I will need to write a hook, well the correct one as the several attempts I have made haven't worked.