ServiceNow ATF - Query Alert From Event, and Incident From Alert

Gerald Onyia
Kilo Guru

The Use Case I am trying to automate using ServiceNow ATF involves:

1. Creating an Event record with specific values (Record Insert into Event table {'em_event'}).

2. Validate that the new Event record contains an Alert number in the 'Alert' variable (Record Validation from Step 1).

This is now where I am stuck. I am trying to query a record from the Alert table ('em_alert') , whose [Alert.Number = Event.Alert]. I have tried 'Record Query', and 'Open Existing Record'. Both don't seem to work.

The next step would then be to query a record from the Incident table, whose [Incident.Number = Alert.Task], then validate a few variables within the Incident record.

The logic behind this is that an Alert is mapped to a new Event based on the input criteria of the Event. Then an Incident record is created from that Alert with specific pre-populated values.

Can anyone offer a solution or some advise? I would greatly appreciate it.

Brad Tilton
ServiceNow Employee

Could you show us the steps you've used so far with screenshots? I think you'll need to do a record query AND open existing record based on the record query.

Hi Brad,

 

This is what I have thus far...

 

 

And the result is...

 

 

I am trying to Query from em_alert, where Number = (Record Insert.Record.Alert), and then eventually Query from incident, where Number = Alert.Task.

 

Hope this information helps. I appreciate any advise or suggestion.

I hear a Server Side Script can be used to accomplish this?

I was able to accomplish this with a 'Run Server Side Script' Test Step. Feel free to view my Accepted Solution for information purposes. Thanks!