How to populate choice filed value based on other field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
GlideRecord is not recommended nor supported in client scripts. They can work sometimes, but not when dot-walking field names like you are doing here. The correct way to approach this is by calling a Script Include with GlideAjax, passing in the newValue. The SI script can then execute the GlideRecord to check for the ITIL role, returning 'self-service' (if that's the correct choice value) or '' for - None - using g_form.setValue('contact_type', <<answer returned from SI>>).
Here's an excellent guide on GlideAjax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Brad,
Thanks For your reply. I made it. I can use form. setValue method to acheive this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Uh, yeah, but how does this satisfy the requirements of the question - to populate the choice value based on other field?
