Use of getUniqueValue() function with Glide Record object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 05:02 AM
Usually getUniqueValue is used with g_from but....
If i use getUniqueValue() function with Glide Record object like below(assuming the table involved is Users table and the query is for a particular record on some condition)
var x = gr.getUniqueValue();
What value will I get in the variable x?
Ideally it should be the sys_id of that records but when i am updating a different table with the value of x , I am getting the "display value" corresponding to the sys_id instead of just the sys_id....there is no additional logic written to do the conversion...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 05:07 AM
Hi Dipesh,
getUniqueValue will return the sys_id. Can you paste your script and steps to reproduce the issue you are facing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 05:12 AM
If you are updating a different table and the field on that table is a reference back to the user table, it will show the display value. getUniqueValue should deliver the sys_id of the record.
There is also the gel syntax:
var sysid_gel = gel('sys_uniqueValue');
var sysid = sysid_gel.value;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 05:13 AM
Hi Dipesh,
getUniqueValue when used with g_form on a client side gives you the sys_id of the record.
If you tell what you exactly are trying to do then we might help you to achieve it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2017 01:54 AM
Hi Dipesh,
The field which you are referring on the other table might be a reference field of same table from your getting the sys_id.
If this not the case, do let me know from which table you are retrieving the sys_id and to which table it setting as display field value.
Thanks,
Venkatesham P