Assign Ordinal Count to File parameter

I am grabbing a dynamic array from JSON. LoadRunner is adding a number to each iteration of the array which is great however I need to have those numbers for later use.



This returns the following values:

id_1, id_2, id_3, id_4, id_5...etc

There is also a id_count of 20 that displays the total found

I would like to take this id_count of 20 and set that as the max of a count parameter.  I'll explain, the array is captured above. Each iteration of the test I want the {count} (below) to increase with the max count set to the id_count of 20 and have the count repeat in a cycle. 


Each iteration would look like this





Up to "URL=MyWebsite/.../{Id}_20", 

Then back to "URL=MyWebsite/.../{Id}_1", 

The best way I can see to accomplish this is to take 20 and parse it in a table. Any idea how to accomplish this? 



  • Verified Answer


    Since you are taking about json, I assume you are using 12.53.

    For your needs I would have used a parameter array




    Then you can in every iteration save this iteration value into a parameter. Something like this:


    // iteration_number should be a loadrunner parameter or a global counter
    // Remember that lr_paramarr_idx is 1 based
    lr_save_string(lr_paramarr_idx("IDs", iteration_number),"ID");


    All calls would then use the same

    More info here:

    br /ola

    Please mark post as solved if your problems or questions is/are resolved.
    If this post was valuable to you, please consider kudo it.