How to render empty variables inside RITM's variable editor?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I have a scenario where the variable editor needs to have variables irrespective of values present in it. Currently I can see RITM renders only non-empty variables after request submission. I have tried both UI policy and Client script with Applies on Requested Item, to validate this but only can view the non-empty variables.
I want to display both empty and non-empty variables in the variable editor of RITM form so that the ITIL user will fill the empty variables on behalf of external users in RITM.
Note: Non-empty variables are rendered correctly in the RITM form. Now I just want empty variables inside RITM form.
Can anybody suggest me the possible solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7m ago - last edited 4m ago
By default, ServiceNow’s Variable Editor only shows variables that have a saved value in the sc_item_option table upon request submission. Empty fields are omitted entirely.
To make empty variables visible on the RITM:
1. Set Default Values: Give the variables a default value (like a single space ' ' or 'N/A') in the variable definition so ServiceNow creates the record on submission.
2. Use an onSubmit Script: Add an onSubmit Catalog Client Script on the Catalog Item view to set empty fields to a single space ' ' right as the user submits the form.
This helps other users find accurate and useful information more easily
