Domanda

I need to start a flow when a document in a SharePoint online document library has been checked in. The responsible is added to the metadata of the library.

The flow checks if the responsible is equal to the editor of that document:

  • If it evaluate to true, the status of the document must change to publish,
  • Else the status of the document must change to draft and an approval must be send to the responsible:
    • If the approval is accepted, the status must change to publish,
    • Else the status must stay on draft and the editor must receive an email that it has been denied.

The problem is that I can't change the metadata of a document when it's not checked in. I've got this error:

The file is not checked out. You must first check out this document before making changes.

The reason why I don't want to trigger when a document is created or edited is because if the editors saved temporary, the flow run with an unfinished document. When it's checked in, the document is finished and then it has sense that the approval needs to start (when the condition for that evaluates successfully).

P.S.: This question continuous on this question: Trigger Flow when document in SharePoint has been checked-in.

È stato utile?

Soluzione

The link you provided in your PS seems to have the answer. Run on created, and then check the check-in status like in the link. If the document is checked out, then go into a loop, wait a few minutes, and check again. Keep looping until the check-in status shows that the document is checked in.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top