- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 11:46 AM
Need to auto populate application business unit which is a reference field referring (cmdb_ci_business_app) depending on the business application field which is also a reference field also referring to (cmdb_ci_business_app) table on a catalog form.
Variable 1: Business Application (Reference - cmdb_ci_business_app)
variable 2: Application business unit(reference-cmdb_ci_business_app)
tried the autopopulate option on the variable it is populating on form level but on ritm its clearing the value.
written a script include and onchange client script also
able to get the value from script include but not able to set on the field . Its setting the value and clearing immediately
please help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 06:45 PM
@Community Alums
For this case you can use 2nd variable as string type and populate the Business unit via onChange client script
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
12-30-2024 01:11 AM
@Ankur Bawiskar Both variables are referring to same table. But both are not displaying same value where as variable 1 would be displaying the value of name and variable 2 the business unit of that name.
FYI please refer below screenshots.
VARIABLE 1: This would be displaying the Business Application Name value.
VARIABLE 2: This is referring to same table but this needs to show the "BUSINESS UNIT" value of the business application selected in the variable 1.
Thank you so much for all the guidance throughout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 06:12 AM
@Community Alums
please share screenshot of 1st variable Type specifications section
Example: I have 2 variables both refer to sys_user
In 1st variable I select Abel Tuter and based on that in 2nd variable you wish to see that user's location
When you set value to 2nd variable it's a user sysId
So how can you see location there
It will always show user when you select any user record
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 06:15 AM
Please see the attached picture @Ankur Bawiskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 06:45 PM
@Community Alums
For this case you can use 2nd variable as string type and populate the Business unit via onChange client script
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
12-31-2024 07:11 AM
Thank You for all the assistance