Can the selectbox variable map to reference field in incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 09:17 PM - edited 09-11-2024 09:31 PM
HI
I have choice variable (Application Affected) in my Record producer, and I need to map the field to Category and Service Fields in the Incident form
The incident form Service should be reference field, and a user should be able to search for the application if reporting from the native view.
I have tried with script in RP
Is this possible can anyone help me to achieve this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2024 01:08 AM
Try using the Map to field option on the variable first to map Application Affected to Service on the incident form. Application Affected should be a reference variable. If this must be a choice variable, set the value of each choice (not the label) to the sys_id of a record on the cmdb_ci_service table, then if it doesn't map due to the type mismatch, in your script you can use
current.cmdb_ci_serivce = producer.application_affected;
I'm not sure what you're trying to do with category and subcategory in the script. You can just have 2 select box variables that map to these fields.