In ATF, how do you pass values

kenrempe
Kilo Expert

Hi, can someone send me a screen shot of what "the control displays a tree picker providing access to fields for this record" looks like?  

https://community.servicenow.com/discussion/create.jspa?chooseContainer=true&draftID=535177

find_real_file.png

I can see Step number and table or record, but no further access to fields.   I am assuming that "If the output variable is an id for a glide record" means [Record].   I can see it's the sysid of the record, but no tree picker.

Is there more to the right of Record (document_id) that I dont see?

find_real_file.png

Ultimately I am trying to get to the "task" number to query sys_email subject for specific email notifications.

Thanks, Ken

1 ACCEPTED SOLUTION

joebusuttil
ServiceNow Employee
ServiceNow Employee

Hi Ken, your screenshot is showing the Tree picker. It's allowing you to get results created from Steps 1,7,11,15 and 17, since you've selected Step 7 in the left hand side you can choose from the two bits of data that were made available from that step, being Record or Table.



I think that you want to create a step of type Log so that you can make available the piece of information that you want to use in future steps.



I hope this makes sense.


View solution in original post

2 REPLIES 2

joebusuttil
ServiceNow Employee
ServiceNow Employee

Hi Ken, your screenshot is showing the Tree picker. It's allowing you to get results created from Steps 1,7,11,15 and 17, since you've selected Step 7 in the left hand side you can choose from the two bits of data that were made available from that step, being Record or Table.



I think that you want to create a step of type Log so that you can make available the piece of information that you want to use in future steps.



I hope this makes sense.


Hi Joe thanks for confirming.   I was taking the text to literally (or perhaps not enough) given you can basically dot walk to the field in a Run Script step such as:



(function(steps, outputs, stepResult, assertEqual) {


var stepID = steps('83d5d0c7139007007e1db86f3244b08e');   // Step 7 sys_id


var riNum = stepID.record_id.number;   // in this example CHG000nnnnn


step.outputs.record_id = riNum; // set the output record_id field of this Run Script to record_id.number of the record in Step 7


stepResult.setOutputMessage("Script sets step.outputs.record_id to record.number: "+ riNum);



})(steps, outputs, stepResult, assertEqual);



In the text above "fields for this record" means the fields for the Step, not the fields for the record referenced in the Step.



It would be a nice enhancement though.



e.g. Subject 'contains'   Step 7: Click a UI Action.Record.Number



Ken