cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abmait
Frequent Visitor

Building a Two Step Approval Process, but second condition is failing

So I am making a two part approval flow. When a iteam is created, a approval email is send out. Then once it is aproved/rejected the iteam is updated with the result, approver name, appving time and then a email with the result is sent out to the creater of the entry. 

 

Then a second appval starts (approval 2) and behaves similarly. The 'Send and Email' step is a email to the approvers that the process is complet.

 

Everything is working well expect for Condition (2nd last step). This step is the same as above it updates the entry and sends the results to the iteam creator. However this step is being bypassed. Did I do something wrong in the set up? Capture.PNGCapture2.PNG 

1 ACCEPTED SOLUTION

Accepted Solutions
leo85
Super User
Super User

Hi @abmait ,

as you can see in the screenshot the action causing the problem is actually "Update item 3", with an error "resource not found".

So the problem seems to be that you are updating an item, which does not exist.

The conditions result is "true", which is what we would expect if you use "Output" from the response.

 

Make sure that you are updating the correct item on SharePoint.

 

Regards,

Leo

 

----------------------------------------------------

If this solved your problem, please mark my answer as complete.

If what I wrote helped you, please give it a thumbs up.

View solution in original post

8 REPLIES 8
leo85
Super User
Super User

Hi @abmait ,

your condition shows "Responses". In my conditions I check for the "Outcome". If this always results in "false" the data maybe different than what you thought.

Could you post the output of "Approval" and the code of the condition?

Regards,

Leo

ScottShearer
Super User
Super User

@abmait 

As mentioned by @leo85 you should be checking the Outcome output from the Approval action in your condition.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
abmait
Frequent Visitor

Hello @leo85 and @ScottShearer ,

 

Thanks for the reply. I  changed it to outcome but when I do that the run fails. 

run status.PNG

 

If I keep 'Choose a Value' or Responses, the run is successful but the condition is skipped over. 

 

Also here is how approval 1 is set up, I had used a template. 

approval 1.PNG

 

There is a difference between what the templlate did and what I did. When I try to right the response date, approver name and aprrover comments to the list I have to include the 'Apply to each'. 

outcome.PNGupdateIteam.PNG

 

@abmait 

Can you post a screen shot of the error?

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Hi @abmait ,

the "approval" action always returns an array, because it is possible to have more than one approvers. You get the apply to each loop, because it iterates over all items of the array. If you only have one approver, this is not an issue. If you have multiple approvers, this will result in the first updates being overwritten.

 

From what you report, the first condition should also always result in "false", because "" is not equal to "approve" and the responses object is also not equal to "approve".

 

Could you please post the error message? Without it, it is hard to say what the error actually is.

abmait
Frequent Visitor

@leo85 @ScottShearer 

 

 

Apologies for the delay. This is the error message for the run at 2:04pm when I used Output in condition 2.  Would the error be caused by  how I set up the apply to each condition or  the sharepoint list not connecting properly ? 

 

apply to each.PNGerror 1.PNGerror message.PNG

leo85
Super User
Super User

Hi @abmait ,

as you can see in the screenshot the action causing the problem is actually "Update item 3", with an error "resource not found".

So the problem seems to be that you are updating an item, which does not exist.

The conditions result is "true", which is what we would expect if you use "Output" from the response.

 

Make sure that you are updating the correct item on SharePoint.

 

Regards,

Leo

 

----------------------------------------------------

If this solved your problem, please mark my answer as complete.

If what I wrote helped you, please give it a thumbs up.

abmait
Frequent Visitor

Thanks @leo85! I reviewd it and found a mistake in the ID field for the "Update Item 3"

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,375)