Need to find an alternative to getValue() in a scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021 09:58 PM
Hi,
I need to know what the alternative to getValue() might be in a scoped app for the purpose of getting the string values of a user record referenced in the current GlideRecord object passed to a script include function. I've tried a number of things, including concatenating with +'', toString(), and getElement, but I have only managed to get the first_name and last_name of the user record but none of the other fields. Does anyone have any suggestions? Attached is my JSON object body formed in the code and the output I have from the stringified body printed in the logs.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021 10:16 PM
Hi,
getValue() worked well for me in scoped application
getDisplayValue() also works well in scoped application
did you check value exists for those fields
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021 10:20 PM
Hi,
getValue() works in scoped application.
Also you can use like this as well
gr.your_field_name.toString()
Mark the comment as a correct answer and helpful if this helps.