SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Position of item is found in WebTable

    Finding a item which exist in WebTable and the position always return zero in case WebTable have many row. But when I debug the position is returned. Please help me!!

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    London, U.K
    Posts
    1,804
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Position of item is found in WebTable

    Post your code.

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Position of item is found in WebTable

    What are you using to find the item?
    I would say use RowCount to get the # of rows and then use GetCellData to get data in a specific row, col and then check if the value exists there.

    Not sure what you are using as of now...

  4. #4
    Member
    Join Date
    Oct 2006
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Position of item is found in WebTable

    Function searchDataInTable(lObject, lObjTable, lStartRow, lStrValueSearch, lColumn)
    'Purpose: search a value in a column of a webtable. It will check that the data is existed in the page for clicking to go view/modify or delete a record
    ' Input: lObject: Page which is content the table. lObjTable: table name which is stored in the repository, lStartRow: the first row will be searched.
    ' lStrValueSearch: the value which will be looking for. lColumn: The column number in the web table.
    ' Output: Return the row of the web-table which contain the lStrValueSearch. If none of data is found, the zero will be returned.

    Dim lCurrentRow, lRowCount
    lCurrentRow=lStartRow
    lRowCount=lObject.WebTable(lObjTable).RowCount
    Do while lCurrentRow<=lRowCount
    If CStr(Trim(lObject.WebTable(lObjTable).GetCellData( lCurrentRow, lColumn)))=CStr(Trim(lStrValueSearch)) Then
    searchDataInTable=lCurrentRow
    Exit Function
    End If
    lCurrentRow=lCurrentRow+1
    Loop
    searchDataInTable=0
    End Function
    lFindRecord=searchDataInTable(lObjPage.Frame("main Frame"), "Issuer List", 2, DataTable("issuerNumber", dtLocalSheet), 2)
    '===============================================

 

 

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 11.54%
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 10:47 PM.

Copyright BetaSoft Inc.