Adding new Data Row in new column with specific format

Hello Guys,

I need to add a new column wich contains this array as bellow :

each answer should have as a value these proposition :

image

How to apply that?

Best Regards

I’ve tried to iterate through the dataTable and split each row data to get each line a part and insert them through another column using the format I’ve talked before as bellow
image
But I get the error saying : For each row : collection was modified enumeration

Hi @hhajar

Could you please share the screenshot of properties of add data row activity. I wanted to see what values you’re assigning there.

2 Likes

image

Im still not adding the other values : id,question_id,… Im trying just with the answer value to test if it’s okay

@hhajar

Please fill all splitted values in the ArrayRow property as in the order of columns defined in the data table in add data row activity.

Please note that you’ve to provide all values as per the columns defined and if there’s no value available, you’ve to assign empty string “”.

Please try once and let me know.

My goal is to have this

as an output in each row of the excel file , so im wondering if i should use addDataRow or addDataColumn?

You’ve to use add data row activity to add the mentioned data in the screenshot. Add Data Column activity will add column to your previously defined data table.

@singhonkar I have always error when I write json format on ArrayRow :

@hhajar

There is mistake in definition of array row property. Could you please show me the column structure of the data table in which you’re trying to store all of these values.

Then, I can guide you how we’ve to write the array row property

1 Like

@singhonkar this is the format of my data Table

@hhajar

Could you please share your xaml file if possible.

1 Like

QuizAWS_Bot2.zip (63.3 KB)

@singhonkar this is it

@singhonkar did you find some solution for my issue?

@Raghavendraprasad could you please take a look at the issue?

Hi there @hhajar

I am afraid I dont understand the requirement fully.

Adding column values or you want to add row values to a data table?

Why JSOn format, if you are using array item?

Could you please rephrase your requirement and simplify it so that I can upload a xaml with a POC?

1 Like

@Raghavendraprasad Im explaining :
what I want exactly, is to insert this JSON format :


into each row of my excel file providing that, in each place colored with yellow should have these values :
image

Well what I understand is you want some data in each row of your data table/excel file.

How do you want that data, can i have a before and after excel files and the data in string not image or screenshot?

Honestly i dont want to type it out looking at the image, just want to test it. Do get back to me with both the end result and initial files and the data that you need I will upload a small code/xaml for this.

@Raghavendraprasad
The initial DataTable looks like this :

The final Excel file I need should be like that :


I simply give you just a row example because all rows should looks like this row