Use Or in If Statement question - 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: Use Or in If Statement question (/Thread-Use-Or-in-If-Statement-question) |
Use Or in If Statement question - mv8167 - 08-08-2012 When I try: Code: If ZipDialogName = "SECURITIES BACKED LINE OF CREDIT - HISTORICAL" or "STATEMENTS - PMA" I get a run error of: Type mismatch: '[string: "STATEMENTS - PMA"]' Function file: O:\QTP_Tests\NightlyRegressionTesting\Tests\LibraryImageAccessFunctions.qfl Line (639): "If ZipDialogName = "SECURITIES BACKED LINE OF CREDIT - HISTORICAL" or "STATEMENTS - PMA" Then". Must I only use: Code: If ZipDialogName = "SECURITIES BACKED LINE OF CREDIT - HISTORICAL" or ZipDialogName = "STATEMENTS - PMA" Then thx for your ideas. RE: Use Or in If Statement question - Saket - 08-08-2012 Yes you are right, should be used as If ZipDialogName = "SECURITIES BACKED LINE OF CREDIT - HISTORICAL" or ZipDialogName = "STATEMENTS - PMA" |