How to fetch Variable Editor Values in Widgets
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 10:50 AM
Hello Everyone!
I am trying to fetch values from Variable Editor in my custom Widget in Server script. The Variable editor is defined on the User Table and it has around two variables, could anyone please guide me?
Thank you!
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 05:56 AM
You should be able to use the same syntax used normally with RITM variables. For example it would look something like this.
userGr = new GlideRecord('sys_user');
userGr.query()
while(userGr.next()) {
//get your varibles from the editor
var variableValue = userGr.variables.yourVariableName
gs.info(variableValue)
}
If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!