How to autopopulate a field value based on same field value present on a different table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago - last edited 3 hours ago
Hi All,
I want to auto populate a field value based on same field value present on a different table. As shown in the below picture Pentest finding records are linked to Pentest project record . We create Pentest finding records clicking on NEW button on related list of Pentest project record . I want to auto populate the field value of project name field on Pentest finding record at the time while clicking on New button. I can't find any UI action exists for this . But when I click on ' i ' button besides the Project name (Reference field) field on Pentest finding form , it redirects to that Pentest project record . Could you please suggest how to approach this ? Please let me know if you need more info .
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago - last edited 8 hours ago
Hi @1_DipikaD,
My understanding is you’re asking how to automatically fill the Project Name on a new Pentest Finding record when creating it from a Pentest Project’s related list.
If yes, you can try any of below approach:
Default Related List Behavior:
When you click New from a related list, ServiceNow already passes the parent Project reference into the Finding form. If you only need the project name for display, you can dot-walk from the reference (finding.project.name) without storing it separately.
Client Script (onLoad):
If you want the Project Name field on the form to show immediately, use an onLoad Client Script to fetch the reference record and set the Project Name field.
Business Rule (on Insert):
If you need the Project Name stored in the Findings table (for reporting/search), add a before-insert Business Rule to copy current.project.name into your project_name field.
NOTE:
The related list New button is system-generated, and you should extend functionality using Client Scripts or Business Rules.
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
by default when New button is clicked on related list the Project name field on "Pentest finding" should get auto populated.
I could see it's getting auto-populated as I could see i icon
which other field on Pentest finding you want to be auto-populated when New button is clicked?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago - last edited 8 hours ago
Hi @Ankur Bawiskar , @M Iftikhar ,
Thanks for your response . The SS are of older records but currently if I want to create new record the value is not getting auto populated . It's for the same field as I mentioned on ss. Unable to do dotwalk for this . Could you please guide me how to do dot walk for this ?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
when you click New in related list does it not populate that Reference field on "Pentest finding"?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader