Mrunal
10 years agoContributor
Unable to save Textfile contents into variable value
Hi,
I want to read text from Textfile and want to post it as a value to project suite variable. I want this value to be used in decision making in different projects like whether variable value is equal to filetext.
I am not able to do it by readwhole textfile and open textfile because i am not able to post it to project suite variable. How to store file contents as variable value?
I want to read text from Textfile and want to post it as a value to project suite variable. I want this value to be used in decision making in different projects like whether variable value is equal to filetext.
I am not able to do it by readwhole textfile and open textfile because i am not able to post it to project suite variable. How to store file contents as variable value?
- Hi Mrunal,
So, as per Ashok's reply, what is the actual problem? What does not work for you? Can you get the contents of the file? Can you assign it to the project variable? Any problems with the further comparison?
Note: direct comparison like "(ProjectSuite.Variables.var name == "abc")" may fail if the data read from the file contain characters like carriage return/line feed/etc. These characters must be removed (for example, with the help of the Trim() function) before comparison.