ATF: steps(SYS_ID) evaluates undefined

TejasriK
Tera Contributor

I'm creating ATF test steps. my first step is a Run server side script which gets the count of records, where the script is setting output as
"outputs.asset_count = parseInt(count)"

IMG_20241018_114944.jpg

and in the 5th step i want the get this output. I'm using the below line and it shows as undefined
"steps('SYS_ID').asset_count" 

IMG_20241018_115039.jpg

1 ACCEPTED SOLUTION

Diogo Ramos
Giga Sage

Hello, if you are using the Run Server Side Script step, it expects outputs as either .table or .record_id, look at the comments of the step :

//      // this sample step's Step config has Output variables named table and record_id
//      outputs.table = 'sc_task';
//      outputs.record_id = gr.insert();

So for your use case, either you map your count to outputs.table or outputs.record_id, or you create a new custom step, where you create your own output variables. 

Hope it helps, 

Cheers
Diogo 

View solution in original post

2 REPLIES 2

Diogo Ramos
Giga Sage

Hello, if you are using the Run Server Side Script step, it expects outputs as either .table or .record_id, look at the comments of the step :

//      // this sample step's Step config has Output variables named table and record_id
//      outputs.table = 'sc_task';
//      outputs.record_id = gr.insert();

So for your use case, either you map your count to outputs.table or outputs.record_id, or you create a new custom step, where you create your own output variables. 

Hope it helps, 

Cheers
Diogo 

TejasriK
Tera Contributor

Thanks @Diogo Ramos it worked by using outputs.record_id.