cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Attachments and versioning

This is a strange issue. I have a SharePoint list that has been customized with PowerApps. Versioning is turned on and a Flow is running when item is modified. The flow specifically compares versions to see if the Status field has changed. The issue is that in the PowerApp when the user attaches a document on modify, it's causing an extra version to exist. This causes the Flow not to run since it thinks the status is the same as previous version. I have recreated this issue. Is there a way to remove this phantom version? I've attached a couple of the version history. Version 3 (created version 4) is when the status changed to Completed and attachment was included. Version 5 and 6 change status, no attachments.

15 REPLIES 15
Mpap
Frequent Visitor

Hello,

      Did you find any solution with your case? Because i have the same issue with this phantom version of the attachment without capturing the previous one from the trigger when a new item is created or modified.

Anonymous
Not applicable

No I never did. The users who have the issue have a workaround: they edit the item and add the attachment, save it, then go back in and update the status so the Flow will run. It's definitely not ideal and still looking for a solution.

Mpap
Frequent Visitor

Hello @Anonymous,

      In my case, i found a solution with this phantom version with attachment. In your scenario, instead of checking the status value for the flow to be triggered, try to check the versions of the attachments with a parse json action. So if the versions are equal no attachments added, if not equal (means +attachments) then check the status value and if is completed, trigger the email action.

My problems with this extra action are solved now...

MarkoT
Regular Visitor

Hello @Mpap could you give more info on this solution pls.

Do I need call on HTTP request

this  _api/web/lists/LIST/items(ID})/versions

or _api/web/lists/LIST/Attachments/ID

JMTeamway
Frequent Visitor

Hi all !

 

I am also interested and impacted by this issue.

I have a Powerapps that allow to edit a SharePoint List with a rather complexe content type, and the attachments are used.

I have also Power Automates that are triggered on items creation/modification with their dedicated logic depending on what has been modified.

 

What I can tell from my experience, is that :

- editing an item creates a new version

- both editing an item and adding an attachments before patching creates 2 versions

- both editing an item and adding 2 attachments  before patching creates 3 versions

 

I guess that somehow, the item fields are saved immediately, and that the attachments creates each another version as soon as they are uploaded, seconds later.

 

In sharepoint Item history, there is nothing displayed for attachements updates, nor in Power Automate Sharepoint get item modification Bloc.

I can just see there are one new version with fields modifications, and one or several "empty" new version just after, with the same user.

 

The big issue there, is that the version are created within seconds, and that the Power Automates Item created or modified trigger checks for updates probably every minutes or so.

Then, when we analyse last modification, we just see an empty version, and the real update that happenned seconds before the last version is not processed.

 

I haven't found a way to deal with this behavior yet, any idea welcome !

 

But the worse is that dealing with this issue, I noticed other cases where 2 versions where created from PowerApps, but this time the item had no attachments.

This means that there is at least one other scenario where a Powerapps Patch creates 2 versions of the item in the SharePoint list.

 

Any PowerApps Pro to give his idea on the topic ?

 

Hey Mpap Can you describe this solution some more. Definitely see how the multiple versions are being added per attachment added. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,058)