I have a Flow that sucessfully takes an email attachment and copies it into a document library which contains several mandatory columns associated with the default Content Type. If I manually create a contract in the library when I save it for the first time the DIP is displayed in Word and I am forced to enter all the manadatory fields.
However, if Flow creates the document becuase it works in background it cannot display the DIP so I have the unwanted situation where there is a document stored which has missing mandatory fields!
This is an invalid state, I need to ensure that ALL the mandatory fields are completed before it moves to the next stage in the Flow. This will need human input, what is the best way to achieve this? I am thinking of using a Planner task as that has a nice UI but cannot see a SharePoint action that will let me do this.
You will need to put a condition in the flow that is triggered by the creation or modification of the flow.
somethign like the following expression for the requried fields should do the trick:
I can see how this will trap the empty mandatory fields, but how do I display the DIP to get the user to update them? The challenge is that they are not creating the document from new, it is an email attachment that is uploaded to a doclib via Flow actions and it is only then that it hits the mandatory columns defined in the Content Type. TBH I am surprised that the document is created at all - it is a bug! If I was in Word creating the document and saving in the same doclib it would not save until ALL the mandatory fields are completed.
I don't think that the creation of the document is a bug but the triggering of the flow potentially is. Personally I preferred the document to remian checked out.
The easiest way to get the user to complete the metadata is to send an email (or any other notification) to the user when the fields are not completed and send a link to the document in that email.
Surely it must be a bug! It is not possible for a human being to save a Word document with a Content Type that has mandatory columns which are null? I agree it is easy to send an email with the link, but I am so trying to reduce emails to zero........
I would really like to understand the thought process on why MS deprecated the DIP in Office 2016, the world has not moved exclusively to the Word app and Office Online just yet....... 😞
I think you will find that when you drag a document into a modern library you will get the same behaviour. I agree that it is not a wanted behaviour. However it seems to be the dsign of modern libraries with the Attention views.
Going back to my original point. Since SharePoint 2001 if a Content Type has a null mandatory field it is not possible to save the document. That is one of the major reasons for defining Content Types and still holds true today when a human being creates/edits a document. BUT, if I use the Flow SharePoint action to create a document with the same Content Type but with null mandatory fields it is created OK with no warnings.
The creation action should fail and I should be able to send an alert to warn the user of this. The current state where the document is created with null mandatory fields is wrong on every level. Why it is critical for this Flow is that one of the mandatory fields is DocumentReviewers where the user uses a People picker column to choose the people who will review the document - this review process is done is parallel which is why I am not using checkout/in. The document is saved with this field null which means the Flow cannot alert reviewers that they have a new document to review.
This is a bug becuase the developers would never have tested the SharePoint create a file action with a content type containing mandatory metadata fields 🙂
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!