cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marty3012
Helper II
Helper II

Modifying Share Point List item value - Trigger Approval

Hi,

 

I have the following SP List;

 

SPAP1.png

Note that the Meeting Approval, Approval Status & Data Management columns are all defaulted to 'Pending'. I would then like to edit an item and change the Meeting Approval column value from Pending to Approved, like so;

 

SPAP2.png

Once this is done I have set up a Flow that then sends out an approval to a person responsible for Data Management;

 

SPAP3.png

 

 

The problem I have is that when the 'Update Item' flow is triggered, it updates the 'Meeting Approval' column again with whatever value is put in (Approved, Pending or just left blank like above image). The result of this is that since it is updated again the 'when an item is created or modified' flow is triggered once more and a 2nd duplicate approval email is sent out.

 

Would anyone know how to get around this?

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @Marty3012

Try a Get item before update item and then your update itemhas as it's ID: 

body('Get_item')?['ID']

See below as it looks to work for me and only change 1 field in my listCapture-247.png

steps for yes branchCapture-248.png

 

If you find my posts helpful, please mark with thumbs up

If this solves your issue, please click "Accept as Solution"

Any questions, just ask.

Thanks, Alan

 

 


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

Proud to be a Flownaut!


View solution in original post

Hi @Marty3012,

 

Please choose the "Meeting Approval Value" dynamic content instead of the "Meeting Approval" dynamic content in the Condition, and choose the "Data Management Value" dynamic content instead of the "Data Management" dynamic content in the Condition:

 

Capture.PNG 

The flow would run twice however, the second run wouldn't send the approval.

 

Best regards,

Community Support Team _ Alice Zhang
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

4 REPLIES 4
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @Marty3012

Try a Get item before update item and then your update itemhas as it's ID: 

body('Get_item')?['ID']

See below as it looks to work for me and only change 1 field in my listCapture-247.png

steps for yes branchCapture-248.png

 

If you find my posts helpful, please mark with thumbs up

If this solves your issue, please click "Accept as Solution"

Any questions, just ask.

Thanks, Alan

 

 


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

Proud to be a Flownaut!


Thanks Alan.

 

Your solution fixed one of my issues. In the Share Point list the 'Meeting Approval' value is not changed and is still set to 'Approved' after the flow is run. However, I still receive a second approval email. I think this could be because of 1 of 2 things (or both);

 

1 - I have set up my 1st condition like so;

SPAP4.png

Whereas you have the following;

SPAP5.PNG

 

I have no idea how this is acchieved as I cant get the 'INPUTS' functionality.

 

2 - I'm also a little unsure about the code

body('Get_item')?['ID']

 Does this need to be entered manually somewhere? In the Expression tab for dynamic content?

 

Thanks for you help

I've managed to work out why the Condition versions were different. I am using the newer version.

 

I also realise what you mean by the 

body('Get_item')?['ID']

 This is so that I select the 'Get item' ID rather than the 'When an item is created or modified' ID. Excuse my ignorance with this, im new to Flow.

 

However I'm still getting two approver emails getting sent out, as the 'Update item' obviously makes a change to the 'Meeting Approval' field which triggers 'when an item is created or modified' again.

 

Is there a way to make the 'When an item is created or modified' run only once within the flow? I've tested using 'Switch' but just cant get it.

 

thanks

Hi @Marty3012,

 

Please choose the "Meeting Approval Value" dynamic content instead of the "Meeting Approval" dynamic content in the Condition, and choose the "Data Management Value" dynamic content instead of the "Data Management" dynamic content in the Condition:

 

Capture.PNG 

The flow would run twice however, the second run wouldn't send the approval.

 

Best regards,

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

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,688)