NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Ignore Flow Control Steps Unless they have Additional Results?

Occassionally, I use ForEach loops to iterate through some given array, and will sometimes log a number of parameters from each element that gets indexed using the "Additional Results" section of the ForEach step.  However, in general, I don't want to log Flow Control steps, only if they have these additional results.

 

I know how to skip reporting Flow Control steps and I know how to get the number of Additional Results a step has using...

Step.AdditionalResults.<CustomResults | ParameterResults>.Count

...but I can't use this in the results filtering because I don't have access to the "Step" object as the "Results" object is the top one provided in the results filtering.

 

 

I tried getting the parent of "Results" which I thought might be its respective Step as well as using the property "Results.TS.StepId" to get the step using the GetStepByUniqueId method through something along the lines of...

<Client sequence>.GetStepByUniqueId(Results.TS.StepId).AdditionalResults.<CustomResults | ParameterResults>.Count

... however I was unable to get a reference to the top-level client sequence, I think partly due to the results processing occurring in the process model so perhaps my client sequence is no longer loaded by the time execution has progressed to this point?

 

Does anyone have any ideas on how I might filter steps based on whether or not they have additional results assigned?  Thanks.



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 1 of 3
(4,201 Views)

Hi, you can try maybe using this method described in the link.

http://zone.ni.com/reference/en-XX/help/370052N-01/tsreports/infotopics/xml_custom_exclude/

 

It allows you to go in and make certain steps have conditional reporting, which it what it sounds like you are trying to accomplish. Post back here if you have any troubles with this.

 

Paul C

Paul C
0 Kudos
Message 2 of 3
(4,080 Views)

Another option is to use the SequenceFilePostStepResultListEntry callback and put some filtering code in there.  Remove it from the ResultList if you don't want it.

 

That way it never makes it to the report and you don't have to worry about it there.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 3
(4,072 Views)