cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Append an array from PowerApps to a SharePoint Library column

Hi All,

 
Good day!
 
I have a array of names from powerapps that I would like to append into my SharePoint library column (person or group)
 
 
As of now I cannot append it since I'm getting an error on the REST.
 
flowws.PNG
@RezaDorrani @yashag2255 Any help would be greatly appreciated, Thank you!
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Append an array from PowerApps to a SharePoint Library column

Hi @CarloPrincipe 

 

When appending to array variable

 

use sharepoint expanded user field as dynamic content as shown in image below

Capture.PNG

 

 

Also, no need to use the rest api for sharepoint

just use add item action and set the value of the multi person field to

 

Capture1.PNG

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Community Support
Community Support

Re: Append an array from PowerApps to a SharePoint Library column

 

Hi @CarloPrincipe ,

 

The problem you encountered when you first started using the Rest API was because the type value you configured in the Body was incorrect, so this problem occurred.

Please could refer to the links below to solve your problem.

a-type-named-sp-data-listitem-could-not-be-resolved-by-the-model-when-a-model-is-available-each-type...

 

http://sharepointdeveloperblog.blogspot.com/2016/08/a-type-named-spdata-could-not-be.html

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User II
Dual Super User II

Re: Append an array from PowerApps to a SharePoint Library column

Hi @CarloPrincipe 

 

In Flow, loop through the array of email id's and use resolve person action to ensure it is valid user and in the loop set an array variable with SharePoint expanded user field dynamic content obtained from resolve person

Capture.PNG

 

 

Then use add or update item action set the value for multi person field as the array

Capture1.PNG

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Dual Super User III
Dual Super User III

Re: Append an array from PowerApps to a SharePoint Library column

Hi @CarloPrincipe 

 

1. You cannot directly send an array from PowerApps to flow. It accepts only a string type input and you will have to probably create a collection out of that array and pass it to flow using the JSON function. You can refer to this blog here for using the JSON function: https://www.appliedis.com/newly-released-json-function-for-powerapps/

 

2. Any particular reason why you are using the REST API and not the direct actions? Note that perspn type columns in SP can be filled using thr email address of the user and so you can pass an array of object with the below schema: 

[
{
"Claims" : "user1@yourdomain.com"
},
{
"Claims" : "user2@yourdomain.com"
}
]

Basically, get the JSON format string from PowerApps, use the parse JSON action to get the data and populate the array and pass it to the multi select person column. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

 

Highlighted
Helper I
Helper I

Re: Append an array from PowerApps to a SharePoint Library column

Hi Reza,

 

thanks for the reply,

 

Sorry for the incomplete information on my initial post, I think I've already done the steps you've provided, although I can be mistaken.

 

file2.PNGfile3.PNG

Highlighted
Dual Super User III
Dual Super User III

Re: Append an array from PowerApps to a SharePoint Library column

Hey @CarloPrincipe 

 

Were you able to take a look at my suggestion? You can initialize a variable out of the apply to each loop as an array variable and use the append to array variable inside the loop and use:

{

"Claims" : "select the id from the selctor here or the current item if it is array of user ids"

}

 

and you can pass this array directly. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Dual Super User II
Dual Super User II

Re: Append an array from PowerApps to a SharePoint Library column

Hi @CarloPrincipe 

 

When appending to array variable

 

use sharepoint expanded user field as dynamic content as shown in image below

Capture.PNG

 

 

Also, no need to use the rest api for sharepoint

just use add item action and set the value of the multi person field to

 

Capture1.PNG

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Helper I
Helper I

Re: Append an array from PowerApps to a SharePoint Library column

@yashag2255 Hi Yashag,

 

Good day!I tried what you did, but what happened was two files has been created with each having their own person name.

 

file4.PNGfile5.PNG

Highlighted
Helper I
Helper I

Re: Append an array from PowerApps to a SharePoint Library column

Hi Reza,
I almost made it without using REST as you've suggested.

 

But there is a BadGateway error. 😞
file6.PNGfile7.PNG

Highlighted
Dual Super User III
Dual Super User III

Re: Append an array from PowerApps to a SharePoint Library column

Hey @CarloPrincipe 

 

You don't have to use the Resolve person action in the suggestion that I have provided. Just use that array with claims as the key and email as the value. In the create item action, for the collaborator claims, ar the extreme right you can see that icon right, click it and it will allow you to select the entire array over there. Put the array with the appended values here. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Community Support
Community Support

Re: Append an array from PowerApps to a SharePoint Library column

 

Hi @CarloPrincipe ,

 

The problem you encountered when you first started using the Rest API was because the type value you configured in the Body was incorrect, so this problem occurred.

Please could refer to the links below to solve your problem.

a-type-named-sp-data-listitem-could-not-be-resolved-by-the-model-when-a-model-is-available-each-type...

 

http://sharepointdeveloperblog.blogspot.com/2016/08/a-type-named-spdata-could-not-be.html

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (9,761)