Sep 26 2019 01:02 AM - edited Sep 26 2019 01:14 AM
My apologies for asking this here, I've been searching for a long time to resolve this and I'm sure I'm missing a trick somewhere. What I want to do is to create a document approval flow whereby the document is locked during the approval process so it can't be altered ie. that all the people who are approving the document know that they are approving the same thing.
I can think of a few ways that this might possibly work e.g. locking the document so it can't be edited or referring the approval to a particular version of the document so you know if it has been altered or not. I was even wondering about pushing the version along with approval history into a new column to make it easier to track. I'm struggling to find any way of achieving this using Flow but I suspect it is because I am doing this in the wrong way.
For reference the files I am trying to approve are in a document library, that document library has been set for Content Approval rather than Request Sign Off flows and I am trying to use an instant flow so that users will pick the appropriate approval flow when it needs to be done.
I realise that signing a document might be an alternative whereby I know that the document hasn't been changed since it was signed but then I get into the more difficult realm of managing certificates for people who have signed it. Flows seem nice, elegant and easy for my users to manage if I can get change control under, well, control
Thanks for any help or advice on this
Richard
Sep 26 2019 06:26 PM
SolutionHi @RichPepp,
My initial thought was to add "Check-out" and "Discard Check-out" Actions to an existing approval Flow template but that didn't workout because the "Eid" field (used when setting the Content Approval Status) changed from "Check-Out" and "Discard Check-out" actions.
If you turn off Content Approval and use a custom Flow you can achieve most of what you outline. When a file is added it triggers the Flow and "Checks out" the file. I added a site column called Status.
Once approved the Status is set to "Approved" and the "Check out" is discarded.
If rejected, the Status is set accordingly and the "Check out" is discarded.
Here is the Flow I used:
It's important to note that the file version will increase with each action against the file (i.e. Status column changes). Not sure if that is a show stopper.
I hope this helps.
Norm
Sep 26 2019 11:07 PM
Thank you VERY much for trying that out. I had wanted to try it that way but failed because when I added the CheckOut action I needed 3 bits of info. The site address and library name were easy but then I also needed the 'Id of the list item the file is attached to'. My document was in a document library rather than a list so there was no id to use that I could think of.
I don't really have a problem using a list if that is necessary but can you tell me how you structured things to manage this? The CheckOut method does seem like a good idea to me
And thanks again for doing that, it was extremely helpful to see that that method would work
Richard
Sep 27 2019 01:24 AM
Sep 27 2019 02:32 AM
Hi @RichPepp,
Use a variable to store the "FileId" and then "Get files" to get the related metadata. An snippet from a like Flow listed below.
I hope this helps.
Norm
Sep 27 2019 02:35 AM
That's quite a clever way of doing it, I'll give it a shot. I had tried GetFiles but had got stuck on the filtering. I'll see if your trick helps
Sep 27 2019 02:42 AM
And it works! Thank you very much for that trick, I don't think I would ever have found it on my own as it was just one step removed from what I was expecting to have to do. I can now check the file out successfully so I should be able to work on the rest of the process now
Thanks again and best wishes
Richard
Sep 26 2019 06:26 PM
SolutionHi @RichPepp,
My initial thought was to add "Check-out" and "Discard Check-out" Actions to an existing approval Flow template but that didn't workout because the "Eid" field (used when setting the Content Approval Status) changed from "Check-Out" and "Discard Check-out" actions.
If you turn off Content Approval and use a custom Flow you can achieve most of what you outline. When a file is added it triggers the Flow and "Checks out" the file. I added a site column called Status.
Once approved the Status is set to "Approved" and the "Check out" is discarded.
If rejected, the Status is set accordingly and the "Check out" is discarded.
Here is the Flow I used:
It's important to note that the file version will increase with each action against the file (i.e. Status column changes). Not sure if that is a show stopper.
I hope this helps.
Norm