SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2002
    Location
    Horsham,PA,USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Correct Syntax for Incrementing a Dynamically Generated Number in a Label

    Hi First Time Poster, Relatively new to Silktest.

    I am having a difficult time generating a loop for a dynamically created page for an ASP driven application.

    Basically I have a series of text boxes and popuplists that when data is entered generate a new row for the next entry of data.

    They are labelled like this:
    ApplicationSizingEditRentRoll.RentRollSizingEditRe ntRoll.HtmlTextField("M to M[21]|#26|$Suite")

    The same text field in the second row looks like this

    ApplicationSizingEditRentRoll.RentRollSizingEditRe ntRoll.HtmlTextField("M to M[21]|#26|$Suite[2]")

    Now the most important element of the second one is the [2] I believe ... that's identifier that its the second row.

    Why I am trying to do is to tie the row identified into the Loop Integer so that each time the field is looped it will automatically increment the numbers for the field. Problem is I am having a difficult time figuring out the syntax of getting that to work correctly.

    Maybe its time to cut my losses and create a function to create these labels?

    Any ideas?

    John Finnegan
    QA Associates





    ------------------
    John Finnegan
    QA Associates
    http://www.qaassociates.com
    John Finnegan
    QA Associates
    http://www.qaassociates.com

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Correct Syntax for Incrementing a Dynamically Generated Number in a Label

    Your tag in quotes is a string type variable, to insert your integer in the tag, enclose the integer in set brackets {}.
    See SilkTest help on the STRING data type, under the header labeled "Evaluating in-string expressions".

    Your code then becomes:
    INTEGER i = 2
    ApplicationSizingEditRentRoll.RentRollSizingEditRe ntRoll.HtmlTextField("M to M[21]|#26|$Suite[{i}]")


    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  3. #3
    Junior Member
    Join Date
    May 2002
    Location
    Horsham,PA,USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Correct Syntax for Incrementing a Dynamically Generated Number in a Label

    Thanks Rob.

    John Finnegan

    ------------------
    John Finnegan
    QA Associates
    http://www.qaassociates.com
    John Finnegan
    QA Associates
    http://www.qaassociates.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:18 PM.

Copyright BetaSoft Inc.