User-Defined Environment Variables vs. Global Variables vs. DataTable Values - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: User-Defined Environment Variables vs. Global Variables vs. DataTable Values (/Thread-User-Defined-Environment-Variables-vs-Global-Variables-vs-DataTable-Values) |
User-Defined Environment Variables vs. Global Variables vs. DataTable Values - imzeeshan - 11-16-2012 Hi, My query is divided into 2 parts. The preconditions to my query are as follows: - Application has 500+ fields for which data has to be filled. More than 100 scripts exist. More than 40 functions. - ScriptName is also stored in DataTable and each script has different data corresponding to it stored in DataTable. - DataTable has been imported in fnImportDatatable function. - Each row in datatable has Script Name as Primary Key/Search Criteria to get current script's data row. Now here are my queries: 1. Once the current row is set; "In the script" should the associated data be imported into environment variables or just variables? Which is better? Same data might be used/might not be used again in the script. 2. If your answer is "environment variables", then this approach of storing datatable values into environment variables, eliminates the parameterization of functions. Functions can now be called without any parameters as environment variables exist for all the data. Is this approach justified as an optimal solution to scripting with dynamic data? Thanks, Zeeshan |