We can use filter function to remove duplicate values from an array in qtp:
duplicateArray=array("1","2","3","1","1","5","3","6","4","4","5","7","9","0","0")
j=0
For i=0 to ubound(duplicateArray)
ReDim Preserve uniqueArray(j)
uniqueArray(j)=duplicateArray(i)
If ubound(filter(uniqueArray,duplicateArray(i)))=0 Then
j=j+1
Else
ReDim Preserve uniqueArray(j-1)
End If
Next
msgbox join(uniqueArray)
On Thursday, 23 February 2012 18:40:42 UTC+5:30, pankaj kumar wrote:
>
> For x = 0 To maxItems
> If InStr(sNewList,(aList(x) & ",")) <= 0 Then
> sNewList = sNewList & aList(x) & ","
> End If
> Next...anybody plz tell me how this statement works..InStr(sNewList,
> (aList(x) & ",")) <= 0
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.