cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Morghan
Level: Powered On

Move items/attachments between locations in SharePoint Online

Hello,

 

I'm at a frustrating dead end. I have seen this exact question asked many times with several differnt answers; none of which are working so far with our requirements.

 

Scenario: List to be used for approval/rejection purposes and need to have item/attached document moved between libraries.

  • User 1 creates new item in a list (fills out form) and can choose a couple different values (Region, Property Name) and also attach a PDF document for approval. Right now, the "Status" column is auto set to New.
  • User 2 will set their own weekly alerts on this list. If they determine a request should be rejected, they will mark as such and will have an option to write Comments. This should notify User 1 about the rejection and provide User 2's Comments.
  • If User 2 Approves the request, they can mark the Status column as such which should move the item to List 2 for User 3 to take action on.
  • Once User 3 takes action on the approved item, they mark Status as Completed and this should move the item/document to a final destination where it will live forever.

This should not be as difficult as it's been. Please help! I am open to List or Doc Lib approach - whatever will get us closer to these requirements.

 

Thanks,
M

1 ACCEPTED SOLUTION

Accepted Solutions
Gristy
Level 10

Re: Move items/attachments between locations in SharePoint Online

Hey Morghan,

 

What do you have so far? This sounds very simple, what you probally want for ease is several flows that do the emails that have conditional start. You can configure conditional start in the options of the trigger.

 

you probally want one something like this on a modified trigger assuming a choice field for status:

@not(equals(triggerBody()?['Status']?['Value'],'Pending’))

 

This way the flow will run if the Status is not = pending i.e. Approved/Rejected you could then put a condition in to process what is required for Approved/Pending - you may also want another column that the flow updates to indicate that it will not run again if the value changes later.

 

Here are a few examples to get you started

Do not run on Create

@not(equals(triggerBody()?['Created'],triggerBody()?['Modified’]))

Do not run if created by a user

@not(equals(triggerBody()?['Editor']?['Email'],'svc-SPAppsFlowAdmin@company.com’))

Run if Status is one of these with a OR

@or(equals(triggerBody()?[‘Status']?['Value'],'Rejected by Procurement'), equals(triggerBody()?[‘Status']?['value'],'Completed'))

View solution in original post

5 REPLIES 5
Gristy
Level 10

Re: Move items/attachments between locations in SharePoint Online

Hey Morghan,

 

What do you have so far? This sounds very simple, what you probally want for ease is several flows that do the emails that have conditional start. You can configure conditional start in the options of the trigger.

 

you probally want one something like this on a modified trigger assuming a choice field for status:

@not(equals(triggerBody()?['Status']?['Value'],'Pending’))

 

This way the flow will run if the Status is not = pending i.e. Approved/Rejected you could then put a condition in to process what is required for Approved/Pending - you may also want another column that the flow updates to indicate that it will not run again if the value changes later.

 

Here are a few examples to get you started

Do not run on Create

@not(equals(triggerBody()?['Created'],triggerBody()?['Modified’]))

Do not run if created by a user

@not(equals(triggerBody()?['Editor']?['Email'],'svc-SPAppsFlowAdmin@company.com’))

Run if Status is one of these with a OR

@or(equals(triggerBody()?[‘Status']?['Value'],'Rejected by Procurement'), equals(triggerBody()?[‘Status']?['value'],'Completed'))

View solution in original post

Morghan
Level: Powered On

Re: Move items/attachments between locations in SharePoint Online

Hi @Gristy, thank you for the reply. What is the name of the conditional start trigger you are referring to? I do not see anything of the sort in the triggers list.

 

Here is what I have now... I've scrapped quite a bit (other flows as well) and just want to start from scratch. Right now, when a new item is created in the list, it looks to see if that item's Request Name already exists in my separate lookup list - if it does, it sets the item's Status to "Resubmitted" and if it's new, it sets it to "New" then adds the Request Name to the lookup list: 

 

2019-10-11_16-16-08.png

Gristy
Level 10

Re: Move items/attachments between locations in SharePoint Online

On all triggers you can include expressions as to whether it runs or not in the settings under the ... menu in top right of the trigger.

 

I suspect for your requirements your going to want when item is created or modified trigger so you can monitor if the user changes the status value.

Morghan
Level: Powered On

Re: Move items/attachments between locations in SharePoint Online

Hi @Gristy - Thank you for this suggestion. I now have 3 flows; the first is set to look at a hidden lookup list and if the "Request Name" is not found, add to lookup list and set "Status" to "New," or if the "Request Name" is already found in the lookup list, create the item with Status = Resubmitted. 

 

The other two flows are set to conditionally run based on Status change - one runs when Status is changed to "Rejected" and the other is set to run when "Status" is set to "Approved - Pending Post" - these two are running great. However, will these two latter flows conflict with the first? I am noticing that the first is now not running at all.

 

Thank you again,

M

Morghan
Level: Powered On

Re: Move items/attachments between locations in SharePoint Online

Disregard - I just noticed the first flow did run; there must just be a slight delay... insteresting. 

 

Anyways, thank you so much!!! I will mark this as resolved and reach out if I have any other questions/issues.

 

M

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 424 members 6,002 guests
Please welcome our newest community members: