Not able to fetch the data from the table (sys_hub_action_instance)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2023 04:07 AM - edited 12-02-2023 04:52 AM
I want to fetch the data in this table using script, but I am not able to fetch the data. On the list view when i click on preview icon I am able to see the data but when I was trying to fetch the data I am getting null value
Snapshot of FORM view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 06:34 AM
var gr = new GlideRecord('sys_hub_action_instance')
gr.get('your_sys_id')
for(var eachVariable in gr.action_inputs) {
gs.info(eachVariable + ' : ' + gr.action_inputs[eachVariable]);
}
This will output the data. Data might be in name/value pairs (JSON) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 06:02 AM
@dchoward9 if its jSON object when you do gs.print /info it shud print /log as object, is that happening when you try to print for action_inputs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 01:16 AM - edited 11-26-2024 01:17 AM
I had sort of the same issue and was closing in on solving via script, when I stumbled upon this video, that solves it by creating a database view between the Action Instance table, and sys_variable_value table (that stores the values there, check the XML for example).
https://www.youtube.com/watch?v=hcdeqyaGKbk
Big shout out to the channel, incident.do (I would tag the channel or the creator, but don't know if they are on the community site here, can't seem to find them)