NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Result Filtering Expression based on Included Step Attributes

I am trying to filture a report by using the Result Filtering Expression under the Include Step Results in the Report Options based on a Attribute I have defined in the step.  I have selected the Include Attributes option but I am not sure how to access that information to filter my report based on it.  

 

To access the information within a process model callback you would use Parameters.Step.AsPropertyObject.Attributes.CustomAttributeName.  This does not work as the result filtering expression.

 

Any help with this would be greatly apprecaited.

0 Kudos
Message 1 of 4
(3,959 Views)

Hi wiltdavi,

 

The reason this does not work is because you must specify an expression for elements of the Result container.  You may add your attribute to the Result container and specify that attribute with the expression, Result.CustomAttribute.

 

Warm Regards,

Daniel Dorroh
National Instruments
0 Kudos
Message 2 of 4
(3,931 Views)
So you are saying that only items in the results contained can be used to filter from the Results Filtering Expression in the Report Options?
0 Kudos
Message 3 of 4
(3,926 Views)

Hi wiltdavi,

 

Correct. The filter expression can only specify elements of the Result container. The help document for this function does not do a good job of explicitly stating this, but it does try. A quote from the help document is as follows:

You can use any subproperty in the expression, but you must use Result in place of Step.Result. For example, when you want to include only failing steps in the report, set the expression to Result.Status == "Failed". Use the ring control to select predefined expressions for all steps, failing steps only, or passing steps only.

 

It should more explicitly state you can only use subproperties of Result.

 

Warm Regards,

Daniel Dorroh
National Instruments
0 Kudos
Message 4 of 4
(3,922 Views)