- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 02:04 AM
Hi,
On a requested item form, we have a select box variable.
If i use g_form.getValue() in catalog client script, i get the value instead of display value.
Is there an option to get the display value, something like g_form.getDisplayValue() for client script / catalog client script?
Solved! Go to Solution.
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 03:03 AM
In client side, you can try by using
var value=g_form.getValue('selectboxName');
var text=g_form.getOption('selectBoxName', value).text;
In server side, you can access it by using producer.variables.selectBoxName.getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 02:10 AM
You could use g_form.getDisplayBox('reference field name')
or use GlideAjax to get the value from script includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 03:03 AM
In client side, you can try by using
var value=g_form.getValue('selectboxName');
var text=g_form.getOption('selectBoxName', value).text;
In server side, you can access it by using producer.variables.selectBoxName.getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2019 07:53 AM
Thank you! it works for variables, as long as they are not in read only - which is basically what i needed, but i don't know if it is possible.
thanks anyway...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 10:25 PM
Tried all above options, but only g_form.getDisplayValue("element_name") worked.