02-20-2018 06:54 AM
First of all I am a beginner in Teststand so apologies for any mistake.
I was trying to change folder path in Report Options window where we can specify path with expression.
But I don't want to change the current file name which is created using Macro ($FileDate, $FileExtension)
I was not getting a specific answer to my question.
Here is the screenshot. So in Report Options dialog I want to specify folder name (Currently 'Folder1') and change it to 'Folder2' based on condition that if specific sequence runs.
Note:
I have tried using sequence callback and creating Report Options sequence and defining the path based on expression but that does not let me access Macro in report options ( $FileDate, $FileExtension, etc..)
Solved! Go to Solution.
02-20-2018 07:23 AM - edited 02-20-2018 07:24 AM
Hi LVK
You can specify an Expression in that box not only a pathname. Maybe go for something like:
(Locals.Operator == "SercoSteveB") ? <Your Folder 1 Path> : <Your Folder 2 Path>
Clearly Locals.Operator == "SercoSteveB" is probably not going to work for you, but any expression that evaluates to True or False will do the trick.
Steve
02-20-2018 07:36 AM
@SercoSteveB wrote:
Hi LVK
You can specify an Expression in that box not only a pathname. Maybe go for something like:
(Locals.Operator == "SercoSteveB") ? <Your Folder 1 Path> : <Your Folder 2 Path>
Clearly Locals.Operator == "SercoSteveB" is probably not going to work for you, but any expression that evaluates to True or False will do the trick.
Steve
Thanks Steve,
I have a question here, I know how to define variables in sequence but how can I define variable (say Locals.Operator) for the ReportOptions window?
02-20-2018 08:13 AM
We are moving into territory that I haven't been before. If you need to switch paths based on the sequence file that was run I am not sure a Local is going to give you the scope that you need. You could do it with a StationGlobal, but that feels like overkill (but maybe worth it to trial the method).
03-24-2018 06:39 AM
Hi SercoSteveB,
It make sense of using StationGlobals but I thought of creating my own file name in the format mentioned in Report options setting.
So, I managed to check for report options callback and then adding expression to check for specific sequence and creating report filename based on format specified in ReportOptions setting.
Thanks for your help!