cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Beat
Helper V
Helper V

Create an array from a single SharePoint list item

I need to read a single item from a SharePoint list and create an Excel file containing data from that item on 3 separate rows.

How can I create an array from a single list item and then create a file or add rows in a table of an existing file, using values from that array? I tried a couple of things but to no avail, any help is appreciated!

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
abm
Super User
Super User

Hi @Beat 

 

What your trigger? When an item is created from SharePoint?

 

For inserting the rows into an existing Excel sheet did you tried Add a row into a table?

 

image.png

 

Above you can map the columns from the trigger. 

 

Not sure why you need an array for this?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

v-bofeng-msft
Community Support
Community Support

Hi @Beat :

Do you want to get some thing like :

 a\Select an item in your SP list

vbofengmsft_0-1633403249687.png

 b\Then generate an array like this

Value
A
B
C

 c\Use this array to generate an excel file

vbofengmsft_1-1633403334978.png

If so,I've made a test for your reference,this is my flow:

vbofengmsft_2-1633403433352.png

The Select an item

vbofengmsft_3-1633403475582.png

Best Regards,

Bof

 

 

 

View solution in original post

Hi @abm 'add a row into a table' was my starting point, my problem was that I had to spread the data from one SharePoint list item across 3 rows in the Excel, some in common, some separate. To illustrate it, assume I have this record from the list item
A, B, C, D, E, F, G, H, I, J, K

And need to output it as Excel table

A

BCDKJIH
ABD K   
ABE K CD

I thought of a append to array variable and compose the actual content of the Excel file to create, but although @v-boweem provided me the solution to create such an array I didn't get it to work. The problem with insert a row into a table is that the file must already exist with the same name, and should be empty to start with, so I chose a different approach now:

Beat_0-1633433828529.png

 




 

View solution in original post

3 REPLIES 3
abm
Super User
Super User

Hi @Beat 

 

What your trigger? When an item is created from SharePoint?

 

For inserting the rows into an existing Excel sheet did you tried Add a row into a table?

 

image.png

 

Above you can map the columns from the trigger. 

 

Not sure why you need an array for this?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

v-bofeng-msft
Community Support
Community Support

Hi @Beat :

Do you want to get some thing like :

 a\Select an item in your SP list

vbofengmsft_0-1633403249687.png

 b\Then generate an array like this

Value
A
B
C

 c\Use this array to generate an excel file

vbofengmsft_1-1633403334978.png

If so,I've made a test for your reference,this is my flow:

vbofengmsft_2-1633403433352.png

The Select an item

vbofengmsft_3-1633403475582.png

Best Regards,

Bof

 

 

 

View solution in original post

Hi @abm 'add a row into a table' was my starting point, my problem was that I had to spread the data from one SharePoint list item across 3 rows in the Excel, some in common, some separate. To illustrate it, assume I have this record from the list item
A, B, C, D, E, F, G, H, I, J, K

And need to output it as Excel table

A

BCDKJIH
ABD K   
ABE K CD

I thought of a append to array variable and compose the actual content of the Excel file to create, but although @v-boweem provided me the solution to create such an array I didn't get it to work. The problem with insert a row into a table is that the file must already exist with the same name, and should be empty to start with, so I chose a different approach now:

Beat_0-1633433828529.png

 




 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,200)