Really struggling with this one, and could use a bit of help I think.
I want to trigger a custom approval flow when the user clicks on "Send for Approval". Only way I can think of doing this is by a change event trigger on the library file.
I have a condition which allows the flow to progress if the approval status is "pending".
So I got that bit working, but as part of the approval, I also need to reset the new expiry date to a year from now.
If I do that after the approval, the approval status immediately reverts from Approved back to Draft (because I changed something), so I do it before the approval....
Of course, then I get into a world of recursion, because the approval status is still "Pending".
I can set a helper column - "ChangedByFlow" or something like that, so I can set that at the same time I do the date, but of course i have to reset it back to false at some point, and in doing so, my Approved status reverts to Draft.
Kind of stuck here... This is my first day of working with Power Automate and Sharepoint, so really any help is very much appreciated.
G
edit:
Should I maybe set the approval status to Approved, then set the Date, and then set the approval status back to approved again? That might work I guess...?
edit2: No, that didn't work either.
@bluphoto7 yes you can set the date and then set the approval status to approved.
Also to avoid infinite loop in flow, you can use a service account in the connections of actions in the flow and then in the trigger you can put a trigger condition as below
@not(equals(triggerOutputs()?['body/Editor/Email'],'user@domain.com'))
Replace "user@domain.com" with your service account email address.
User | Count |
---|---|
100 | |
37 | |
26 | |
23 | |
16 |
User | Count |
---|---|
132 | |
52 | |
48 | |
36 | |
24 |