retrieve and display product owner name from the business app that was selected on catalog form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2024 03:56 PM
business_app is variable selected on form
name to display on form
lookup it_application_owner name from cmdb_ci_business_app table
javascript: new RequestUtils().getAvailableBusinessApp(current.variables.business_app);
This is where I need help with the script include
extract from 'RequestUtils' script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2024 03:58 PM
I am trying to retrieve the it application owner name from the business app table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2024 05:02 PM
The OIT Technical Owner variable should be a reference on the sys_user table since you want to populate this with a user sys_id. A Reference qualifier filters the list of available choices. In this case it sounds like you want to populate the variable with the one value from the field on the cmdb_ci_business_app table, and since this variable appears to be read only, it doesn't matter what the reference qualifier is as this only comes into play when a user is manually selecting a record from a list. If you are on the Utah or later version, try using the Variable Auto-populate feature for the OIT Technical Owner variable, dependent on the Business application variable, dot-walking to the it_application_owner field.
If you are not yet on Utah or later, or this doesn't work in this scenario, an onChange Catalog Client Script when Business application changes is what you need. You can use the controversial getReference
or the more robust GlideAjax
both good tools to have in your belt