abt filter function
if iam using below two statments its ok
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
if i use msgbox MyResult
it shows type mismatch
plz help me
Answers were Sorted based on User's Feedback
Answer / lakshmi
Boss,
Filter function will a zero-based 1-D array. so we have to
use subscript.Filter function may return more than one
matches. then u have to take a loop (for or while) and u
have repeat this loop until ubound of that array.So in u r
case, please see the answer below:
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
Msgbox MyResult(0)
Here i was mentioed subscript as 0 as we have only one item
which matcehs with u r search.
If there is more than one match, then u have to do likt
this.
My = Array ("Apples","Oranges", "Apricots")
MyResult = Filter(My, "Oran")
For i=0 ubound(MyResult)-1
Msgbox MyResult(i)
Next.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / reddy prasad
Hi
thanks lakshmi
regards
reddy prasad
raju16prasad@gmail.com
| Is This Answer Correct ? | 0 Yes | 0 No |
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?
how we can take data in the username field text box into variable in web application explain with example and give all functions to get data into variables
Can anybody give the script of below things. 1. Add sheet 2. Adding columns 3. Set the values in that columns(In the rows) 4. Close the sheet 5. How can we create 3 sheets in one Excel sheet??
How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.
hi what is the use of "dim" in automation objective model or any where what is the use of "dim" plz tell me
How will you handle the situation when object is not captured during record?
diff between dim & redim ? in detailed? pls any one explain me?
How to make arguments optional in a function?
I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?
can we do load testing , by using QTP......?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
How to Analyze the Checpoint results by Checking Bitmaps?