How could you get the risk assessment to calculate automatically?

geek1
Kilo Contributor

How would you get the risk assessment calculate on a change request to populate as soon as you click submit on the assessment so you don't then need to click the UI action to calculate?

 

I tried piecing both the UI actions together (see below) but it's not performing the calculation. It saves the risk assessment but that's it.

19 REPLIES 19

You could also just put the g_form.save(); code where you put the g_form.setValue();.   Saves on a bit of processing and worked in my testing.


Didn't work for me. It saved the questionnaire before the questions were completed.Defeated the point of it all, really!


I would say that does defeat the point.  



For me it simply saves/refreshes the change form after submitting the answers and then displays the risk on the refreshed page.   This is on Fuji Patch 10 if that makes a difference.


Thank you for this little gem, this has worked nicely


I think just adding a reload to the Fill Out Risk Assessment UI action after submit works too without having to create a custom field to manage this.



if (eventObj.view.mandatoryResult) {


  d.close();


  setTimeout(function(){ location.reload(true); }, 2000);


  }