How to add a dynamic reference field in questionnaire Survey?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 03:54 AM
Hi,
I need to add a dynamic reference field in Survey questionnaire , auto populate REQ number in the survey questionnaire.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 07:00 AM
Sure, here are the steps to add a dynamic reference field in a Survey questionnaire and auto-populate the REQ number:
1. Navigate to the Survey Designer:
- In the ServiceNow filter navigator, type "Survey Designer" and select it.
2. Open the Survey where you want to add the dynamic reference field:
- Click on "Open" and select the survey from the list.
3. Add a new question to the survey:
- Click on "Add Question" button.
- In the "Question" field, type your question.
- In the "Type" field, select "Reference".
- In the "Table" field, select the table where the REQ number is stored (usually, it's the "Request" table).
4. To auto-populate the REQ number, you need to create a UI Policy:
- Navigate to "System UI > UI Policies".
- Click on "New" to create a new UI Policy.
- In the "Table" field, select the "Assessment Instance" table.
- In the "Short description" field, type a description for your UI Policy.
- Click on "Submit" to save the UI Policy.
5. Add a UI Policy Action to auto-populate the REQ number:
- Open the UI Policy you just created.
- In the "UI Policy Actions" related list, click on "New".
- In the "Field name" field, select the reference field you added to the survey.
- In the "Value" field, type the script to auto-populate the REQ number. You can use the "g_form.getValue()" function to get the REQ number from the current record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 11:48 AM
I am in need of pulling information from a table to the assessment form as informational and trying to follow the steps.
Could you clarify the "Value" field, where do I find that?
Is there additional scripting to be done other than using the g_form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 10:32 AM
To update a field to the header of assessment, the widget needs to be updated as adding a reference field and coding a script did not work.
This is the link that would get you to the widgets, just need to update the xxxxxxx with your instance name.
https://xxxxxxx.service-now.com/nav_to.do?uri=sp_widget.do?sys_id=869baae273fc10100d72a56a4cf6a72c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2024 08:54 PM
Hi,
This link doesn't work. Can't view the widget. Can you please add more details as in the name of the widget and what needs to be changed.
Appreciate your help!