Unable to get value of referance field in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 03:16 AM
I am trying to get value of ref field in client with g_form.getValue("fieldname"); but it returns nothing.
Even g_form.getDisplayBox("fieldname"); gives no value.
All other field values are getting returned in the client script except ref field.
What is alternative.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 03:36 AM
@Snehal13 please check if you are using the correct backend name of the field inside getValue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 03:44 AM
Yes. Using proper name. Infact, one other field which is a referance field value is getting alerted in same client script. that ref field is also usingg_form.getValue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 07:23 AM
I forgot to add- This is a workspace client script.
var value = g_form.getDisplayBox('fieldName').value; isnt working. g_form.getValue("fieldname"); also not working to retrieve value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 08:02 AM
This used to work but seems not to be working now. What about g_form.getReference() or GlideAjax?
Did you try that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2023 03:35 AM
I get no value in alert for var value = g_form.getDisplayBox('fieldName').value;