How to I pass the Incident Number when creating an Incident Task using a related list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 05:12 PM
I am trying to pass the incident number to an incident task when using a related list on a form. How do I tackle this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 06:24 PM
Hi @Randy33 ,
Hope you are doing well.
I think it should happen OOB please refer the screenshot below when I clicked on new button in the related list the incident number was automatically populated.
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 07:30 PM
HI @Randy33 ,
I trust you are doing great.
To pass the incident number to an incident task when using a related list on a form in ServiceNow, you can follow these steps:
Create a new field on the incident task table to hold the incident number. Let's call it "incident_number" (you can choose a different name if you prefer).
On the incident form, navigate to the related list where you want to pass the incident number (e.g., the incident tasks related list).
Edit the related list properties by right-clicking on the related list header and selecting "Configure > Related List".
In the Related List form, locate the "Reference Qualifier" field and enter the following code:
incident.number=javascript:current.number
This code sets the reference qualifier for the incident tasks related list to filter the incident tasks based on the current incident number.
- Save the related list form and return to the incident form.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi