VAlue from datasheet is not being picket up - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: VAlue from datasheet is not being picket up (/Thread-VAlue-from-datasheet-is-not-being-picket-up) |
VAlue from datasheet is not being picket up - Mala - 02-17-2011 Hi, I have to enter date in a field based on whether that field is enabled or disabed. My coede reads as follows Code: Dim FromDateDisabled Any hlep is appreciated please!! RE: VAlue from datasheet is not being picket up - jsknight1969 - 02-17-2011 Try changing to this Code: If lcase(FromDateDisabled) = "false" then GetROproperty is going to return a string value. Hope this helps. RE: VAlue from datasheet is not being picket up - Rekhapramod - 02-17-2011 Hi, Please try the below code to get the value Code: DataTable.Import("C:\Documents and Settings\qtp\Desktop\Login_Details.xls") Thanks, Rekhapramod RE: VAlue from datasheet is not being picket up - Mala - 02-17-2011 Sorry guys, Both the solutions didn't work. I guess, it is wrong from my part in explaining the problem. Let me rewrite the problem. The code after the 'Then' statement is not being picked up whether it is reporter... event or entering the value from the datasheet. Thanks for all the help I am getting from you guys. RE: VAlue from datasheet is not being picket up - jsknight1969 - 02-17-2011 I can only see that scenario happening if your script is throwing an error. VbScript stops execution on error unless otherwise specified. You do have to be careful. depending on the errored statment, the next line might be the true statement of the if..condition and not be the results you want. Code: on error resume next 'go to next statment Hope this helps. RE: VAlue from datasheet is not being picket up - Mala - 02-18-2011 Thank you. Go to next step upon error works. For now, I will give a break and will dig into this. I want to see if there is a way to make this work without the go to next step line. But, I can't thank you enough for answering my questions. |