SOLVED
Home

Flow is behaving wierd

%3CLINGO-SUB%20id%3D%22lingo-sub-329290%22%20slang%3D%22en-US%22%3EFlow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329290%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20configured%20a%20flow%20in%20a%20Document%20Library%2C%20which%20will%20trigger%20when%20an%20item%20is%20added%20or%20modified.%3C%2FP%3E%3CP%3EInside%20the%20Flow%20we%20have%20the%20Start%20Approval%20process.%3C%2FP%3E%3CP%3EWhen%20I%20edit%20an%20item%20properties%20%2C%20all%20the%20other%20items%20also%20trigger%20the%20Flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EAsesh%20Maity%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-329290%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flows%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331433%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331433%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Adam%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20communicated%20with%20the%20flow%20power%20community%20as%20you%20suggested.%3C%2FP%3E%3CP%3EThey%20suggested%20to%20check%20the%20status%20and%20restrict%20to%20call%2C%20before%20the%20Start%20an%20Approval%20action.%3C%2FP%3E%3CP%3EThe%20details%20url%20of%20discussion%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FGeneral-Flow-Discussion%2FApproval-Flow-is-Behaving-Wierd%2Fm-p%2F214025%23M20341%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FGeneral-Flow-Discussion%2FApproval-Flow-is-Behaving-Wierd%2Fm-p%2F214025%23M20341%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guess%20the%20suggestion%20is%20the%20way%20around%2C%20but%20there%20will%20be%20always%20a%20new%20instances%20will%20be%20created%20for%20each%20and%20every%20created%20or%20modified%20items%2C%20which%20are%20Pending%20or%20Draft%20state.%3C%2FP%3E%3CP%3EI%20need%20to%20understand%20why%20every%20time%20the%20flow%20is%20creating%20a%20new%20instances%20if%20the%20item%20is%20in%20Pending%20or%20Draft%20state.%3C%2FP%3E%3CP%3EAppreciate%20your%20help%20for%20the%20same.%20Is%20it%20the%20built%20in%20behavior%20of%20the%20Action%20or%20I%20made%20a%20mistake%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20and%20Regards%3C%2FP%3E%3CP%3EAsesh%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330824%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330824%22%20slang%3D%22en-US%22%3E%3CP%3ENo%2C%20unfortunately%20not%20%3A(%3C%2Fimg%3E%26nbsp%3B%20Any%20responses%20on%20the%20flow%20community%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330797%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330797%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Adam%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20got%20the%20chance%20to%20view%20the%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330065%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330065%22%20slang%3D%22en-US%22%3EThanks%20Adam%2C%20i%20send%20the%20query%20to%20the%20Flow%20Community%20as%20you%20suggested%20in%20your%20last%20Post.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330047%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330047%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20try%20have%20a%20look%20at%20this%20as%20soon%20as%20possible!%20It's%20a%20busy%20day%20at%20the%20office%20today%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20meantime%2C%20I%20would%20suggest%20also%20posting%20this%20in%20the%20flow%20community%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FMicrosoft-Flow-Community%2Fct-p%2FFlowCommunity%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FMicrosoft-Flow-Community%2Fct-p%2FFlowCommunity%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3Ejust%20Copy%20%2F%20paste%20the%20last%20post%20in%20there!%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%2F%20Adam%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2F%20Adam%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-330037%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330037%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20sending%20the%20screen%20shot%20of%20the%20Flow.%3C%2FP%3E%3CP%3EIn%20my%20flow%20when%20a%20file%20is%20added%20or%20modified%2C%20it%20should%20trigger.%3C%2FP%3E%3CP%3EI%20have%20made%20the%20Content%20Approval%20Settings%20on.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20requirement%20is%20according%20to%20the%20classification%20(Custom%20choice%20Field)%20selection%2C%20it%20goes%20approval%20managers%20to%20approve%20the%20document.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20flow%20i%20did%20as%20follows%3A%3C%2FP%3E%3CP%3E1.%20Call%20the%20action%20when%20the%20file%20is%20added%20or%20modified.%3C%2FP%3E%3CP%3E2.%20Get%20the%20File%20Metadata%20(here%20in%20the%20FileIdentifier%20i%20added%20Identifier%20value)%3C%2FP%3E%3CP%3E3.%20%26nbsp%3BInitialize%20the%20classification%20variable%3C%2FP%3E%3CP%3E4.%20Set%20the%20variable%20of%20Classification%20which%20i%20selected%20from%20the%20form.%3C%2FP%3E%3CP%3E5.%20Check%20the%20condition%20if%20the%20document%20uploaded%20needs%20Approval%20process%2C%20as%20we%20have%20the%20requirement%20that%20all%20the%20documents%20should%20not%20go%20for%20the%20approval%20process.%3C%2FP%3E%3CP%3E6.%20Switch%20action%20to%20start%20the%20approval%20process%20according%20to%20the%20classification%20selected.%3C%2FP%3E%3CP%3E7.%20For%20the%20case%20%22Architecture%22%20%2C%20i%20call%20the%20content%20approval%20status%20to%20set%20the%20the%20Approval%20Status%20as%20%22pending%22.%3C%2FP%3E%3CP%3E8.%20call%20the%20%22Start%20an%20Approval%22%20.%3C%2FP%3E%3CP%3E9.%20Condition%20to%20check%20the%20Response.%3C%2FP%3E%3CP%3Ea.%20%26nbsp%3BIf%20Response%20is%20%22Approve%22%2C%20again%20call%20the%26nbsp%3Bcontent%20approval%20status%20to%20set%20the%20value%20as%20%22Approved%22%3C%2FP%3E%3CP%3Eb.%20Send%20the%20mail.%3C%2FP%3E%3CP%3Ec.%20%26nbsp%3BIf%20Response%20is%20%22Reject%22%2C%20again%20call%20the%26nbsp%3Bcontent%20approval%20status%20to%20set%20the%20value%20as%20%22Reject%22%3C%2FP%3E%3CP%3Ed.%20Send%20the%20mail.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20the%20issue%20is%20suppose%20i%20added%20a%20file%2C%20with%20all%20my%20valid%20metadata%2C%20it%20starts%20the%20Approval%20process%2C%20and%20its%20status%20is%20%22Pending%22%20%2C%20sending%20a%20mail%3C%2FP%3E%3CP%3ENow%20again%20i%20add%202nd%20new%20file%2C%20it%20starts%20the%20approval%20process%20and%20its%20status%20is%20%22Pending%22%20%2C%20and%20send%20an%20approval%20mail%20to%20the%20approver%2C%20but%20at%20the%20same%20time%20a%20new%20instance%20of%20previous%20item%2C%20flow%20starts%20the%20approval%20process%2C%20and%20a%20mail%20is%20sent%20again%20for%20the%20previous%20item.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20if%20i%20status%20is%20%22Approved%22%20after%20approving%20by%20the%20approver%2C%20that%20items%20instance%20is%20not%20triggering.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHence%2C%20if%20there%20are%202%20files%20which%20is%20%22Pending%20%22%20state%2C%20and%20third%20file%20is%20added%20into%20the%20library%2C%203%20approval%20mails%20are%20recieved%20or%203%20instance%20is%20creating.%3C%2FP%3E%3CP%3EBut%20if%20there%20are%202%20files%20%2C%20one%20is%20%22Pending%20%22%20and%20other%20is%20%22Approved%22%20and%20a%20third%20file%20is%20added%20in%20the%20library%2C%202%20approval%20mails%20are%20recieved%20or%202%20instance%20is%20created.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20your%20help%20to%20figure%20out%20my%20mistake.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20671px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71836i526DD0CB712F1530%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22FirstImage.jpg%22%20title%3D%22FirstImage.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20916px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F71837iEB2080F1D7C9DBC3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222ndImage.jpg%22%20title%3D%222ndImage.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329703%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329703%22%20slang%3D%22en-US%22%3EYes%20the%20approval%20starts%20for%20all%20the%20files.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329702%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329702%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20the%20approval%20starts%20in%20all%20the%20cases.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329359%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329359%22%20slang%3D%22en-US%22%3EYou%20can%20paste%20the%20flow%20if%20you%20want%20to%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329358%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329358%22%20slang%3D%22en-US%22%3ESo%20it%20starts%20an%20approval%20for%20all%20files%20in%20the%20library%20%2C%20even%20though%20they%20aren%E2%80%99t%20modified%3F%20And%20this%20when%20a%20new%20item%20is%20created%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329329%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329329%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20start%20an%20approval%20process.%3C%2FP%3E%3CP%3EIn%20the%20approval%20process%20once%20I%20approve%20it%20changes%20the%20Statues%20to%20%22Completed%22%20(Custom%20Field).%3C%2FP%3E%3CP%3EBut%20if%20I%20have%20another%20item%20its%20approval%20process%20starts.%20This%20is%20the%20issue%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329301%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329301%22%20slang%3D%22en-US%22%3E%3CP%3EWhat%20exactly%20do%20you%20want%20to%20accomplish%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329298%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329298%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20we%20identify%20the%20file%20in%20the%20Flow%2C%20that%20we%20usually%20did%20in%20ShareDesigner%20%22Current%20Item%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-329295%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20is%20behaving%20wierd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-329295%22%20slang%3D%22en-US%22%3E%3CP%3ESounds%20like%20expected%20behaviour!%20The%20flow%20triggers%20when%20any%20item%20in%20this%20library%20is%20created%20or%20modified%3C%2FP%3E%3C%2FLINGO-BODY%3E
Asesh Kumar Maity
Contributor

Hi 

I have configured a flow in a Document Library, which will trigger when an item is added or modified.

Inside the Flow we have the Start Approval process.

When I edit an item properties , all the other items also trigger the Flow.

 

Thanks

Asesh Maity

 

 

 

14 Replies

Sounds like expected behaviour! The flow triggers when any item in this library is created or modified

Can we identify the file in the Flow, that we usually did in ShareDesigner "Current Item"

What exactly do you want to accomplish?

I need to start an approval process.

In the approval process once I approve it changes the Statues to "Completed" (Custom Field).

But if I have another item its approval process starts. This is the issue

 

So it starts an approval for all files in the library , even though they aren’t modified? And this when a new item is created?
You can paste the flow if you want to

Yes, the approval starts in all the cases.

Yes the approval starts for all the files.

Hi 

I am sending the screen shot of the Flow.

In my flow when a file is added or modified, it should trigger.

I have made the Content Approval Settings on.

 

My requirement is according to the classification (Custom choice Field) selection, it goes approval managers to approve the document.

 

The flow i did as follows:

1. Call the action when the file is added or modified.

2. Get the File Metadata (here in the FileIdentifier i added Identifier value)

3.  Initialize the classification variable

4. Set the variable of Classification which i selected from the form.

5. Check the condition if the document uploaded needs Approval process, as we have the requirement that all the documents should not go for the approval process.

6. Switch action to start the approval process according to the classification selected.

7. For the case "Architecture" , i call the content approval status to set the the Approval Status as "pending".

8. call the "Start an Approval" .

9. Condition to check the Response.

a.  If Response is "Approve", again call the content approval status to set the value as "Approved"

b. Send the mail.

c.  If Response is "Reject", again call the content approval status to set the value as "Reject"

d. Send the mail.

 

Now the issue is suppose i added a file, with all my valid metadata, it starts the Approval process, and its status is "Pending" , sending a mail

Now again i add 2nd new file, it starts the approval process and its status is "Pending" , and send an approval mail to the approver, but at the same time a new instance of previous item, flow starts the approval process, and a mail is sent again for the previous item.

 

But if i status is "Approved" after approving by the approver, that items instance is not triggering.

 

Hence, if there are 2 files which is "Pending " state, and third file is added into the library, 3 approval mails are recieved or 3 instance is creating.

But if there are 2 files , one is "Pending " and other is "Approved" and a third file is added in the library, 2 approval mails are recieved or 2 instance is created.

 

Appreciate your help to figure out my mistake.

 

 

 

FirstImage.jpg2ndImage.jpg

Hi! 

 

I'll try have a look at this as soon as possible! It's a busy day at the office today :)

 

In the meantime, I would suggest also posting this in the flow community:

 

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity

 

just Copy / paste the last post in there!

 

/ Adam

 

 

 

/ Adam

Thanks Adam, i send the query to the Flow Community as you suggested in your last Post.
Solution

Hi Adam,

 

Have you got the chance to view the issue?

 

No, unfortunately not :(  Any responses on the flow community??

Hi Adam,

 

I had communicated with the flow power community as you suggested.

They suggested to check the status and restrict to call, before the Start an Approval action.

The details url of discussion

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Approval-Flow-is-Behaving-Wierd/m-p/2140...

 

I guess the suggestion is the way around, but there will be always a new instances will be created for each and every created or modified items, which are Pending or Draft state.

I need to understand why every time the flow is creating a new instances if the item is in Pending or Draft state.

Appreciate your help for the same. Is it the built in behavior of the Action or I made a mistake?

 

Thanks and Regards

Asesh

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
36 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies