when the factor responces will be saved in response table after assessment saved?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
when the factor responces will save into the Response table((Table - sn_risk_advanced_risk_assessment_instance_response) like after assessment is calculated and saved or just after response is given? Beacuse i have created an automated scripted factor where it use to calculate the max(manual factor, field value in control) but for manual factor i am getting 0 as input
Labels:
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI @Subhash_Saggela ,
Factor responses in the sn_risk_advanced_risk_assessment_instance_response table are saved only after the user completes the assessment and clicks "Save" or "Save & Calculate"—not immediately after each response is given. This means your scripted automated factors will only have access to the latest manual factor values once the whole assessment is saved or calculated.​
How Factor Response Saving Works
Manual input (Manual Factors): Users enter responses during the assessment. These entries are not persisted in the response table until the assessment is explicitly saved or calculated (using "Save & Calculate").​
Automated/scripted factors: These factors calculate their value during the assessment using either other factor values or external logic. However, when you try to access manual factor values from your script, if the user hasn't hit "Save," the script often sees zero or the default value for those manual entries.​
Result:
If you run a scripted factor while the assessment is in progress, manual factors return 0 or blank because they have not yet been saved.
Only after "Save & Calculate" are the entries written to the response table and the automation/aggregation logic will reflect the actual responses.​
Impact on Your Scripted Factor
If your automated script is intended to use both field values (from the control/record) and manual factor entries, you need to ensure your calculations occur after the save action—when the latest responses are committed to the table.​
Some implementations use Post-Assessment Business Rules or scheduled jobs to update calculations in bulk once all responses exist.​
Best Practice
Notify users: Inform them that they must click "Save" or "Save & Calculate" for calculations and automated logic to consider their manual responses.
Script design: If you need live updates, consider triggering additional calculations right after save, or use scripts in Post Insert/Update Business Rules.
Summary:
Factor responses are saved to the response table after the assessment is saved or calculated, not immediately after manual input.
Scripted automated factors will see up-to-date manual response values only after that save, which explains why you see zeros before saving.
