We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Unable to Use Insert Record Step Data Pill for Reference Variables in Catalog ATF – Record Field Gre

TanviP003244604
Tera Contributor

 

Hi Community,

 

I am working on an ATF test where I first insert a record into a custom table containing fields:

 

Application Name

 

Problem Type

 

After inserting the record, I open a catalog item form which has variables:

 

Application Name (Reference to custom table application field)

 

Problem Type (Reference to custom table problem type field)

 

My requirement is to use the record created in the Insert Record step to populate the catalog variables using data pills.

 

Issue:

When I try to use the data pill from the Insert Record step, the Record and Table fields appear greyed out and I am not able to select the inserted record directly.

Question:

Is there a recommended way in ATF to pass values from an Insert Record step into catalog item reference variables?

How to use run ser sides script step and how to create output variable in it.

Find attached screenshot.

 

Any guidance or best practice would be very helpful.

 

Thanks in advance!

2 REPLIES 2

Craig Gruwell
Mega Sage

 Hi @TanviP003244604,

 

How are you assigning the values for Application Name and Problem Type when inserting the record into the custom table?  

 

I think the most straightforward (and scalable) approach, would be to enable "parameterized testing" option the ATF test record.   Next, create the parameter definitions for each (application name and problem type).  Once the parameter definitions are configured, then create the test run data sets and define the values you want to use for the insertion into the custom table.

 

Update your Record Insert test step and use the data picker to select the values from the Parameters collection.

 

Update your Set Variable Values (SP) test step and then use the data picker to select the values from the Parameters collection. 

 

This way the same values you used for the insertion will also be the same values for the catalog item variable assignments and the best part is you can define multiple data sets (if applicable) without hard coding anything directly into your Insert Record test step, especially if the workflow/flow associated with your catalog item has any conditional logic based on the Application Name and Problem Type.

 

 

 

 

 

 

Hi @Craig Gruwell 

Application name in custom table is referencing to business application table and problem type referencing to problem data Custom table.so first I am inserting data into business application and problem data Custom table.

Then using that records with data pill to insert record into application data Custom table.

Can you please explain how to do parameter testing, I am new to ATFs.

Any help would be appreciated