- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I'm working on a catalog item in ServiceNow titled "Laptop/Desktop Request". It includes several fields like radio buttons, text boxes, and lookup fields. I'm stuck on how to properly configure field dependencies.
Here’s what I need help with:
- Foundation Data Dependency
For the field "Cost Centre", the dependency says:
Data from Foundation data gathering. Autopopulate for the logged in user information.
How do I implement this kind of auto-population? Should I use a script or reference qualifier? Any examples would be super helpful.
Is this the correct approach? Any best practices I should follow?
I’ve attached the Excel file I’m working from: https://hclo365-my.sharepoint.com/:x:/g/personal/sonalisin_hcltech_com/EQflsfQzVkdCo3qUnbf_Jd8BqupHg...
Thanks in advance for your guidance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for marking my response as helpful.
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
3 weeks ago
Hi @mrsahilmir1 ,
If you want to auto populate the logged in username then you can use the below code snippet in default tab of that variable.
javascript:gs.getUserID()
It will auto populate the logged in user's name.
For any other auto populate you can either you use the other function or glide Ajax. For more information please go through the Autopopulate user details onChange of user name in Catalog Item post.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
for auto population you can use these options
1) variable default value supports javascript code
OR
2) onLoad client script + GlideAjax
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
3 weeks ago
Thank you for marking my response as helpful.
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
3 weeks ago
Hi @mrsahilmir1 ,
If you want to auto populate the logged in username then you can use the below code snippet in default tab of that variable.
javascript:gs.getUserID()
It will auto populate the logged in user's name.
For any other auto populate you can either you use the other function or glide Ajax. For more information please go through the Autopopulate user details onChange of user name in Catalog Item post.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @mrsahilmir1 ,
I hope you saw my reply.
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. It will help future readers as well having similar kind of questions and close the thread.
Thanks,
Bhimashankar H