Concatenate rows datatable

Hi all,

I have the following question. Please see my workflow below.

  • I extract a datatable called ExtractDatatableCenelecWIRelations
  • I assign a value varCenelecWIRelations as “”
  • The datatable has a two columns “Links” and “Standard Reference”
  • For each row in the datatable I want the combination of “Links” and “Standard Reference”
  • Please note that this is included in another for each as the content of the datatable is different per item I am treating.

Example 1st datatable (of my first item i am treating)
Column “Link” Column “Standard Reference”
12345 ABCDEFG
67890 HIJKLMNOP

Example 2nd datatable (of my second item I am treating):
Column “Link” Column “Standard Reference”
000000 PPPPPP

Desired outcome 1st item:
12345 ABCDEFG and 67890 HIJKLMNOP

Desired outcome 2nd item:
000000 PPPPPP

Issue: My second result is “12345 ABCDEFG and 67890 HIJKLMNOP and 000000 PPPPPP” instead of “000000 PPPPPP”.

What am I doing wrong to not getting the desired result?

Workflow:



Couldnt understand your problem clearly.
Are you using the same step for both the tables? or a different copy of the steps?
It would be better if you send a xaml file itself

Hi @kaderms

Sorry I cannot share the xaml. I will try to summarize better:

  • I have a list of projectnumbers for which I need to scrape data from a datatable

  • For projectnumber 1, this datatable can consist of 3 rows but for projectnumber 2 it can consist of 4 rows (so it varies based on the projectnumber)

  • But the datatable always consists of 2 columns: “links” and “standard reference”

  • In this datatable I need to concatenate every row for those 2 columns

  • It works but for the second projectnumber my output is the concatenation of the first project number + the concatenation of the second project number. This is not my desired outcome for the second projectnumber as I only want the concatenation of the second project number.

Hope this helps for your understanding.

Yup. I kinda got most of this from your first post too. :wink:

The only check I would do is, are you resetting the value of your string variable varCenelecWIRelations to “” before you start concatenation for the second project?

Yes, I am :frowning:.

Okay. If that’s the case, are you reading on top of the existing data table for the second project too? Can you try Clear Data Table before your second project??