How to show display value of variable under 'Question Answers' table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 07:57 AM
Guys,
I am using DocuSign spoke to map multiple of variable fields of record producer, so I have to use Question Answers table. I tried to set Filed Value by using Question Answer Record > Value. It works but facing problem in some fields eg. requestor name (using sys_user), it will show sys_id value as below picture instead of 'Name' of user. I am not sure that any iddea how to make it shows display value instead of sys_id?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 09:13 AM
Hi Bird,
Hence in the record value field having a sys_id, you can use Toggle scripting to get the display name.
Something like below:
var shortDesc = fd_data.trigger.current.value; //map your value field name
var grU=new GlideRecord("sys_user");
grU.get(shortDesc)
return grU.getDisplayValue();
Hope it helps
Thanks
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 07:29 PM
Hi Murthy,
Thanks for feedback. The thing is this is the sub-flow that will look up for each variable and set the field to DocuSign.
The variable type 'single line text', 'multiple choice' are fine but only 'reference (sys user)' and 'select box' type are facing problem, so I am not sure how to write script to cover showing display value for all variable type?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 01:43 AM
Thanks Murthy,
The sub-flow I am using is to loop mapping fields. Currently we do have problem only with 'reference' variable type that go to sys id., so not sure how to write the script?
The idea is:
if variable type is reference / or variable name is 'requested for', then get display value ELSE (other types of variable), just leave it show the actual value as it is.