Formatting issue with checkbox variables in HR Case description using createCaseFromProducer()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I’m working on an HR Application Access Request Record Producer that uses sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer() to create HR cases. Earlier, the environments (Implementation, QA, Production, Sandbox) were handled through a single select box, so the description appeared neatly like “Which environment do you need access to?: QA.” To make it more user-friendly, I switched to multiple checkboxes, but the HR Utils now adds them as “Implementation = true” or “Sandbox = false” in the case description.
Since ServiceNow doesn’t support multi-choice fields in Service catalog/Record producer, and label-type variables (used to display the question) aren’t processed by the
HR Utils, I’m unable to format this cleanly. Overriding the description after the Utils call doesn’t help as it gets overwritten during case creation. I’d like to avoid creating a custom table just for this — has anyone found a supported way to customize or reformat the HR case description for checkbox variables while still using createCaseFromProducer()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
the only way is let the OOTB script include and function set the description.
you can use before insert BR to perform string manipulation on that description field.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
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
I would hate a post processing script for this and client is not ready to accept either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I would post it on idea portal as per previous suggestions. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
then inform customer that it's not feasible to implement this.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
