Forum Discussion

sameerjade's avatar
sameerjade
Frequent Contributor
7 years ago

Parameterizing a Store (Files) object name

I have a function in which I validate a text report. The baseline of the report is stored under Store>Files. I have more than 1 baseline report. I am using the command Files.MyBaselineReport1.Check("MyActualReport")

 

This works good if I hard-code 'MyBaselineReport1' name in the function. However, I want to call my function several times for different baseline reports. I tried creating a parameter for the baseline report name, something like this:

 

function compareReport(report_name){

Files.report_name.Check("MyActualReport")

}

 

Then I call my function: compareReport(MyBaselineReport1)

 

However this is not working and I get an error. Can store objects be parameterized?

 

Thank you!

4 Replies