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

Transfer data from one sharepoint list to another based on user selection

I'm setting up an asset register, and need the user to be able to transfer items between locations. The way I've set it up is each location has its own sharepoint list acting as the asset register. How would I set up a flow to transfer the data to a specific location depending on what location the user selects within a powerapps form? For example the user could choose to transfer to Location 123. Rather than literally building 200 flows with each only able to target one location for transfer, how could I make it dynamic? 

 

Is it a formula I need to input within flow? I want to avoid patching the data directly as I want to be able to track the transfer, doing it through flow seems easier. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @rsparks 

In our SharePoint Online site, we have defined groups for people playing a specific role and these groups are then used to grant specific permission to items - in our case to folders and/or documents.

HTTP call to break permission inheritanceHTTP call to break permission inheritance

In the above action we are using a HTTP call to SharePoint to break the permission inheritance for the item we want to grant specific permission to.

Grant owner group contribute permissionsGrant owner group contribute permissions

We already knows the groups principal id, so above we grant the owner group Contribute permissions to the item, again using HTTP call to SharePoint.

Grants read permissions to another groupGrants read permissions to another group

As we also have a group that are allowed to view the item, we use again a HTTP call to SharePoint to grant the group Read permissions.

Loop through people roles, identify the userLoop through people roles, identify the user

Some people plays a specific role, so for each of them, we first get their Principal ID, again using an HTTP call to SharePoint.

Grant user contribute permissionGrant user contribute permission

With the user's principal Id we can now grant the user Contribute permissions to the item using an HTTP call to SharePoint.

 

The above is how we do it and it may help you decide on going that way or doing it differently. In your case, I would consider where to manage the location groups (one group per location) and members (people) - in Active Directory or in SharePoint Online.

 

Note that by using groups for giving access to items in your list, there will be no need for the users to choose their location, as they will only be able to see/view the items to which they have permissions 🙂

Kind regards, John

View solution in original post

3 REPLIES 3
JohnAageAnderse
Super User
Super User

Hello @rsparks 

That sounds too complex and with a possibility of assets being dropped between lists, thus loss of data.

 

You should not move your data around, just add a location column and present the assets at each location based on the value in the location column.

 

If you also wants to limit the assets to the people who are at the location, then have security groups for each location and grant/revoke permission to assets when the location changes.

 

Just ideas, looking forward to hear what you are going to do/try 🙂

Kind regards, John

Hi @JohnAageAnderse , that's exactly what I ended up doing. Though I am a bit worried about hitting the list item cap, and powerapps keeps giving me little warnings about delegation limits (the register currently has 3000 items). 

 

I have the user select their location, and then the gallery filters items based on the selection.

 

What happens if the list ends up exceeding 5000 items?

 

And how do I set up the security groups like you've mentioned? Or rather, how do I have each location's assets only viewable by people in one specific group?

Hello @rsparks 

In our SharePoint Online site, we have defined groups for people playing a specific role and these groups are then used to grant specific permission to items - in our case to folders and/or documents.

HTTP call to break permission inheritanceHTTP call to break permission inheritance

In the above action we are using a HTTP call to SharePoint to break the permission inheritance for the item we want to grant specific permission to.

Grant owner group contribute permissionsGrant owner group contribute permissions

We already knows the groups principal id, so above we grant the owner group Contribute permissions to the item, again using HTTP call to SharePoint.

Grants read permissions to another groupGrants read permissions to another group

As we also have a group that are allowed to view the item, we use again a HTTP call to SharePoint to grant the group Read permissions.

Loop through people roles, identify the userLoop through people roles, identify the user

Some people plays a specific role, so for each of them, we first get their Principal ID, again using an HTTP call to SharePoint.

Grant user contribute permissionGrant user contribute permission

With the user's principal Id we can now grant the user Contribute permissions to the item using an HTTP call to SharePoint.

 

The above is how we do it and it may help you decide on going that way or doing it differently. In your case, I would consider where to manage the location groups (one group per location) and members (people) - in Active Directory or in SharePoint Online.

 

Note that by using groups for giving access to items in your list, there will be no need for the users to choose their location, as they will only be able to see/view the items to which they have permissions 🙂

Kind regards, John

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (54,852)