ServiceNow activities - get recrod / list recrods

Hey guys,

I have a question regarding ServiceNow activities in the Studio. I am unable to use the ServiceNow app scope, as I’m unable to connect to SN learning instances, therefore I’m forced to use the activities that use the connection established in Orchestrator (which works fine).
Aaanyway, I’m trying to get a single record or a list of records from a chosen ServiceNow table. I’m using activity “list all records” and “get record”. The output of those activities is a variable of type “incident” or “incident_task”.
The question is: how can extract data from that variable such as records sys_id? Is it possible at all?

Hi @piotr.pelczar,

Welcome to the UiPath Community :tada:

There should be properties to these variable of type “incident” or “incident_task”. Check the properties while you are in Debug mode and data has been retrieved in it.

Thanks,
Ashok :slight_smile:

@piotr.pelczar

welcome to the community

if it is list of incidents say saved in variables var

var(0). will give you all functions and values you can retrieve…there would be an id property for sysid…similarly others as well

cheers

Does anyone have any examples of how to query the variables retrieved to see the various components? The documentation barely exists, if at all.

I figured it out–when doing “list all records,” go to the Properties pane, then click the plus sign to the right of the “list of incident” output field. Then choose “switch to data table” and specify/define a table object to receive the records. Then you can work with the query results–I have no idea how the entity collection would be usable in this context.