SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Aug 2006
    Location
    pune
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    To find out if the values in a WebList are Sorted?

    Hi, Can anyone tell me how can we check if the values of a WebList are alphabetically Sorted?
    Thanx, Kiran

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: To find out if the values in a WebList are Sor

    read out all values row by row into an array and check if the result array is sorted or not
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Member
    Join Date
    Apr 2005
    Posts
    84
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: To find out if the values in a WebList are Sor

    The following function will allow you to check for binary sort (sort_type = 0) and textual (sort_type = 1). Just pass an array with the WebList elements in it to the function along with sort type.
    <font class="small">Code:</font><hr /><pre>Function IsSorted (Ar,sort_type)
    IsSorted = True
    For i=0 To UBound(Ar)-1
    If StrComp(Ar(i), Ar(i+1),sort_type) = 1 Then
    IsSorted = False
    Exit Function
    End If
    Next
    End Function<font class="small">Code:</font><hr /><pre>
    Can't take credit for the code - someone posted a response to my question a long time ago and I thought I'd share it.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:41 AM.

Copyright BetaSoft Inc.