11-26-2019 02:56 AM
Hi All,
I know how to change the name of a step during execution of a sequence dynamically. However I want this name to be saved in the sequence file and not only changed during runtime.
Fyi: I have to automatically add numbers to step names for error logging purposes.
Is it possible to save these new step names?
Solved! Go to Solution.
11-26-2019 08:52 AM
Hi Nick,
you need to save it to "RunState.SequenceFile.Data.FileGlobalDefaults".
11-26-2019 09:11 AM
Hi,
Thanks for your help, however I don't see how I can save step names into "RunState.SequenceFile.Data.FileGlobalDefaults".
I used Fileglobaldefaults once, but it was to save variables permanently in the sequence file.
So please could you explain this further?
Thanks.
11-26-2019 09:24 AM - edited 11-26-2019 09:26 AM
Hi Nick,
sorry for not being specific enough. Also I took a wrong turn in writing "FileGlobalDefaults"...
I just created a new sequence, adding one "Action" step and navigated to it:
RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"]
Then, with the TeststandAPI shown, I can get this:
RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"].Name
If you save the new string here, it should be kept, even after the execution ends.
I hope now it works. 😉
Edit: Of course you should reference to the steps you want to change by number, not by name as obviously calling them by name wouldn't work.
11-26-2019 09:31 AM
Hi,
Thanks, this was where I was looking for…