Populate a field value from a control record to an assessment instance question

Pratiksha KC
Kilo Sage

ServiceNow GRC - Populate Assessment Instance Questions from Control Fields and Complete Attestation Programmatically

Hi Experts,

I have a requirement in ServiceNow IRM/GRC Compliance module and would like guidance on the best approach.

Existing OOTB Process

  1. User opens a Control record (sn_compliance_control).

  2. User clicks the Attest button.

  3. An Assessment Instance (asmt_assessment_instance) is opened.

  4. User clicks Take Assessment.

  5. A popup appears with attestation questions.

  6. After submission, answers are stored in Assessment records and the Assessment Instance moves from Ready to take to Complete.

  7. The Control then moves to the next stage/state.

New Requirement

The client does not want users to navigate to the Assessment popup.

Instead, we have created custom fields directly on the Control form and users will answer the attestation questions there.

The custom fields are displayed only during the attestation stage.

Custom Fields on Control (sn_compliance_control)

  • u_is_control_implemented

  • u_attach_evidence

  • u_explain

These correspond to the assessment questions:

  • Is the Control Implemented?

  • Attach Evidence

  • Explain

Assessment Tables Involved

Assessment Instance:

  • asmt_assessment_instance

Assessment Questions:

  • asmt_assessment_instance_question

I can see that the Assessment Instance Questions table contains records for the above questions and fields such as:

  • Metric

  • String value

  • Reference ID

  • Additional Information

The Assessment Instance is initially in state Ready to take and becomes Complete after a normal assessment submission.

What I Need

When the user clicks the Attest UI Action on the Control:

  1. Find the currently attached Assessment Instance for that Control which is in Ready to take state.

  2. Copy values from the Control fields into the corresponding records in asmt_assessment_instance_question.

  3. Complete the Assessment Instance programmatically.

  4. Move the Control to the next state.

Any guidance or sample implementation would be greatly appreciated.

Thank you.

0 REPLIES 0