Not able to fetch the data from the table (sys_hub_action_instance)

Mallise
Tera Contributor

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  when I click on info icon
Mallise_1-1701521370217.png

Snapshot of FORM view

Mallise_2-1701521411533.png
 
 
some one please help me to fetch the data from this record
7 REPLIES 7

dchoward9
Tera Contributor

@Mallise @VaranAwesomenow 

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) ?

@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

Jesper Hilde
Tera Contributor

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)