Highlighted
Trusted Contributor.
Trusted Contributor.
316 views

Finding the Action Last Iteration DataTable Row

Jump to solution

Can anyone tell me how to find the datatable last iteration row during run time which has been set in the Project Action Call Properties?

Should be simple but doesn't appear so!!

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Finding the Action Last Iteration DataTable Row

Jump to solution

No there isn't a quick answer to this unfortunately, however there are a couple of methods to get around the problem...

1) Open the "Script.mts" file in the Action 0 folder of the project, this tells you the number of iterations for each project action.  You can write a function to read this file and return those values.

2) Move the code to execute following the last action iteration into a new action following, create your own iteration counter and write the number of iterations into the datatable.

 

View solution in original post

5 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Finding the Action Last Iteration DataTable Row

Jump to solution

Have you tried something like:

rc = DataTable.GetRowCount

Mark Smith.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Finding the Action Last Iteration DataTable Row

Jump to solution

Hi Mark,

Thanks for the reply but it's not the last physical row of data I need it's the last action iteration row number.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Finding the Action Last Iteration DataTable Row

Jump to solution

I have the same problem. Have you found the solution?

Thanks.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Finding the Action Last Iteration DataTable Row

Jump to solution

No there isn't a quick answer to this unfortunately, however there are a couple of methods to get around the problem...

1) Open the "Script.mts" file in the Action 0 folder of the project, this tells you the number of iterations for each project action.  You can write a function to read this file and return those values.

2) Move the code to execute following the last action iteration into a new action following, create your own iteration counter and write the number of iterations into the datatable.

 

View solution in original post

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Finding the Action Last Iteration DataTable Row

Jump to solution
Thanks a lot!
I have used option 1) and it works perfectly.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.