No answer to my canundrum as yet.

But, I'm gonna keep swinging for the fences...my S.F. Giants are in 1st Place! :smiling_face_with_sunglasses:

I have a Library full of existing documents I inherited. New documents are added through PowerApps everyday.

I have a List that has meta data specific to the existing documents and those newly uploaded to the Library and the Members those document are associated with.

Both the Library and the List have a column called 'CQUnqID'.

I have manually pre-populated the column in both for all existing documents and created a calculation in the Library that automatically auto-populates the specific and unique 'CQUnqID' along side the doucment whenever a new document is created in the Library.

My issue; where a document with the 'CQUnqID' being upload from PowerApps already exists in the Library the Flow adds a 'new' document with a bad extension that is useless.

I need an edit to the Flow that first, based on the 'CQUnqID' of the current document being created in the Library, deletes the existing file in the Library that matches that 'CQUnqID' coming in from the upload action.

Then, the rest of the flow, creating the new file, can continue.

How do I get that new 'CQUnqID' from the Patch/List into the current action and Flow so that that existing file is deleted and a new one allowed to be created in the Library?

1 Answer 1


I've been reading your posts all week, I feel for ya.

I have a possible partial solution for you.

First make sure that versioning is on in the library, major versions only.

Next, using a condition try to Get Items with the same name, and if the length() of the value returned is 0 (i.e. there are no files with that name), use Create Item; otherwise, use Update Item to make a new version.

Taken from here Source

Hope this helps you make progress.

  • You're and angel! I confirmed 'Major Versions Only' is on. How do I write the Get Items to ensure I get from the Gallery/List ONLY the item being updated to the List, and that that item is the ONLY one being deleted from the Library before the new one is created in the Library? I've tried this on my own and have had to reload a lot of the Library twice guessing wrong with the condition language. May 13, 2021 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.