
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello,
I have a scenario when I have 2 iteration rows in Action 1 and 10 iteration rows in Action 2.
Is it possible to run first iteration in Action 1, then just 5 iterations from Action 2, second iteration from Action 1 and rest 5 iterations from Action 2?
Is it even possible? If so, is there any guidance?
Regards,
Krystian
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The vartypes may be different which is why the If stmt fails, try:
If Cint(Environment("TestIteration")) = 2 Then
ExitActionIteration
End If
Mark Smith.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Add this as your first line in Action1
If Environment("TestIteration") = 2 Then
ExitActionIteration
End If
You then then do simialr in Action2
Mark Smith.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I tried this:
If Environment("TestIteration") = 2 Then
ExitActionIteration
End If
MsgBox DataTable("Value", dtLocalSheet)
In localSheet I have a column named "Value" with three lines and this does not work. Do you know why? I have checked settings and Action Call Properties are set "run on all rows".


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The vartypes may be different which is why the If stmt fails, try:
If Cint(Environment("TestIteration")) = 2 Then
ExitActionIteration
End If
Mark Smith.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
That is correct Mark. Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi @Sperk it works good with
If Cint(Environment("ActionIteration")) = x Then
ExitActionIteration
however test does not go back to action 1 when finished some lines in action 2. Then I want it to go back to action 2 again to finish some lines there. Is it possible?
BR,
Krystian


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You would probably need to do something like:
DataTable("Action1",dtLocalSheet).SetCurrentRow = x
Mark Smith.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I think this does not work as in "Action1" should be column name, not action name:
The retrieve DataTable.Value operation failed. The <DD recon> column does not exist.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
It should be the local datasheet name for Action1. I just assumed the sheet would be called Action1.
Mark Smith.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi, exactly, DD recon is name for Action1. So it does not work with local datasheet name for action. UFT suggests there should be column name.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Look in the help for 'SetCurrentRow' and 'SetNextRow. These are methods used to manually traverse the datatable rows when you do not just want to process rows 1 to n in order.
Mark Smith.