getValue() is returning label of a choice instead of Value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2022 11:31 PM
Hi all,
I want to get the value of a choice of a field.
Field Label: Month
Field ID: month
Field Type: Choice
var month = g_form.getValue('month');
g_form.addInfoMessage(month);
By this I am getting the 'January', but I need the value of January i.e., '1'.
How to achieve this?
Thanks,
Yesh
16 REPLIES 16
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 01:30 AM
Hi,
It got resolved.
Thanks
Yesh
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2022 02:37 AM
So what was the issue and what was the fix?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader