Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
9 years ago
Solved

Is there a way to have a data driven loop iterate X number of times where X is a variable value?

I have a web test with a DDLoop.  This test basically simulates ordering items.  My dataset has thousands of items from various departments.  I created a user form that allows the user to select the department that houses the items they want to order.  I am trying to give the user the ability to tell the DDL how many items to order - how many times the loop should iterate.  The DDL create wizard gives the option to set this at time of creation, but I can't seem to figure out how to make the End Record value a variable value. 

 

Any thoughts?

 

Thanks for your time!

  • Never ,mind.  Figured it out.

     

    for(RecordIdx = 1; RecordIdx <= UserForms.UserForm1.cxText_NumberOfItems.Text; RecordIdx++)

     

    NumberOfItems is my variable. 

1 Reply

  • DCat1223's avatar
    DCat1223
    Frequent Contributor

    Never ,mind.  Figured it out.

     

    for(RecordIdx = 1; RecordIdx <= UserForms.UserForm1.cxText_NumberOfItems.Text; RecordIdx++)

     

    NumberOfItems is my variable.