Mapping the data for single input with multiple output

Hello All,

I am working on a scenario where i give the input file with list of Values wherein tool has to go to a website and fetch the table values related to my input and put it in a output file.

For this have used Data scraping method to pull data from website. I am getting the output but only thins missing is the mapping between the input values and output values.

In the output file, i am not getting my input value. For eg:

Input Values:
Types
Animals
Birds
fruits

The Output format which i am geting:

Name Colour
Lion Yellow
Elephant Black
Parrot Green
Crow Black
Apple Red
Grapes Green

Desired Output format:

Types Name Colour
Animals Lion Yellow
Elephant Black
Birds Parrot Green
Crow Black
Fruits Apple Red
Grapes Green

Kindly suggest some ideas.

Thanks,
Keerthi

Hy @Keerthiga_Subashini, welcome to the UiPath Community

The Data Scrapping method generates a data table.
What you must to is to add a new column to it using the ‘Add Data Colunm’ activity and then loop through the Extracted data rows using a ‘for each row’ activity and inside this loop assign fill in this column like this row(“NewColumn)” = Type with an assign activity.

Is this clear to you. If so please like my post and mark my answer as solution, it helps me :slight_smile:
Any questions please let me know

Regards

Hey William,

Thank you for the response! I have tried “Add data column” activity which adds a new column, but when i loop through the values are repeating in the column and not row.
Since i am new to this and in learning phase(by own) it is bit difficult for me to put the flow.

Can you please show me some example? Can we use Add data row activity? kindly help.

Thanks,
Keerthi

Hy @Keerthiga_Subashini

Can you share me your entire workflow project so I can take a look at it?!

Regards

Hey William,

I am sorry, due to confidentiality issue i cannot share the project.

But below are the steps i have used,

  1. Read CSV file where i have the list of values for which i will be pulling the data from website.
  2. Stored the input values in Datatable.
  3. Open the webpage- Link
  4. Used For Each loop- To search for the input in webpage.
  5. Data scraping for getting the Table of values like i gave the example above. Stored in another datatable.
  6. Write it in CSV file.

This gives me the output like below without the input column,

Name Colour
Lion Yellow
Elephant Black
Parrot Green
Crow Black
Apple Red
Grapes Green

I have included the steps where i used Add data row, since i dnt know how exactly it will work.

Thanks,
Keerthi

Hy @Keerthiga_Subashini,

If you want to update the existing record, you can do a ‘for each row’ and use the assign activity:

row(“Column”) = "Animal " + row(“Column”).toString, for example, Animal can be used as a variable.

Is it clear to you?
Any questions please let me know

Regards