Continue counting from last item after break activity

I can’t really provide any samples unless I recreate something for you. It would be easier if you can post image snips or xamls from what you are working with.

Are you adding each row into a Queue item then using Get Transaction Item to process each one? or are you doing something different? I suppose you would only want to upload the 10 rows you want to process (like only the ones that don’t have “Complete”), then create an Output component which can update the file with that data to the matching row as desired.

Regards.

Thanks for the reply. I will upload the workflow later as have to cut off some of the link.
we ain’t using queue item . All the data are saving inside the excel file. from there i m using for each row to do actions. Thanks ~~

Hi @ClaytonM, very useful info, these longer posts on best practices from experienced developers are very valuable.

I’ve seen a couple other posts in the past that say using idx to specify column in a loop or assign activity (not in selector) was actually best practice over using the col name because it’s faster. Could you explain more why idx isn’t good to use?

Thanks!
Shelby

1 Like

Hey,

If by ‘idx’ you mean the index of the column in a data table, right? I don’t want to confuse that with the ‘idx’ attribute used inside a selector, which is bad practice.

Using index or column name both are the same speed.

The only difference really is that if the columns change the order, the index will need to change, while the column name will not need to be changed. Vice versa, if the column names change in the file (and not the order), then the column name will need to be changed, while the index will not need to be changed. So, there really isn’t a right answer on deciding to use index over column name.

However, column name helps you identify which data is being used/updated during the process or in your code, so there’s a benefit in that method.

If you wanted to update all columns, where you would loop over the columns, the speed is the same.
For example:

For each col In dt1.Columns //TypeArgument: DataColumn, Output: colIndex
    Assign: row(col.ColumnName) = values(colIndex)

versus using index

For each v In values //TypeArgument: String, Output: valIndex
    Assign: row(valIndex) = v

So the loop goes over the same number of values, or it should assuming the array of values has the same number of items as the column count

Regards.

Clayton

1 Like