NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

search and delete step from result list

What i want to do is basically what it is stated, search a result list for a particular step and delete it.

 

 On the example i have a case structure each case will call a sequence. so before executing the sequence i want to find if that step was chosen before in order to delete the previous result and keep the new one.

 

i know that on the result list array, the name of the step is stored here Locals.ResultList[x].TS.StepName

 

so how i wanted to solve the problem is by doing  looping through  Locals.ResultList[x].TS.StepName until the step name is equal to TheRunState.NextStep.Name. Then if that is true do Locals.ResultList.DeleteElements(Locals.postodelete,1,0)

 

i have tried this but no luck, i tried with a looping statement and didnt work. some race conditions are inolved thats why i have some locals created there.

 

any ideas?

CLAD, CTD
0 Kudos
Message 1 of 3
(5,069 Views)

I found a community example that deletes from the result list: https://decibel.ni.com/content/docs/DOC-15520

 

Is your issue coming from the actual deletion or from finding the right step to delete?

0 Kudos
Message 2 of 3
(5,000 Views)

Hi buton,

 

1.) Static: Settings pane Properties->RunOptions->Result Recording Option->Disabled

2.) Dynamically : Last step Result: Statement: SetNumElements(Locals.ResultList,GetNumElements(Locals.ResultList)-1

Just see the Example

 

Hope that helps

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 3
(4,994 Views)