![]() |
Is a value in an array - 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: Is a value in an array (/Thread-Is-a-value-in-an-array) |
Is a value in an array - Brian.Osborne - 02-17-2011 I have a simple array I've defined. I'm pulling a value into my datatable as a seperate action to use later. Now I need to check my array and execute a line of code ONLY if the value I put into my datatable is present in the array. Code: TestArray = Array("value1", "value2") RE: Is a value in an array - surya_7mar - 02-17-2011 Code: Function ArrayFind(arrToSearch,strToFind) RE: Is a value in an array - tarun - 02-17-2011 Suggest you to use a collection instead of an array RE: Is a value in an array - basanth27 - 02-23-2011 Worth a try.. Think about it, Join the array using the join keyword and then use the instr function to check if the string exist. |