cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlanPilz
Level: Powered On

SharePoint Document Library - How to check condition on Site Column

I have a document library with a custom column "Status". I want to trigger the Flow to start when this status is changed to Submitted.

 

I have used "When a file is created (properties only) and added a condition that should check if Status Value contains "Submitted"

 Yes and No both send me an email just as a test for now. I first tried a condition that checked the Status Value is equal to Submitted, but it always comes back with a false response. Using contains I thought may be a little more forgiving. Anyway I now get this error.

 

Unable to process template language expressions for action 'Condition' at line '1' and column '2217': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

flow.PNGflow_cond.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 REPLIES 3
Highlighted
Community Support Team
Community Support Team

Re: SharePoint Document Library - How to check condition on Site Column

Hi @AlanPilz,

 

Could you please show a bit more about your Status column within your SharePoint library?

 

I suppose that the Status column is a Choice type column in your SharePoint library, is it true? In addition, I think it is not appropriate to add the "When a file is created (properties only)" as the trigger. The "When a file is created (properties only)" trigger would be fired only when a file is created in your SharePoint library, if you modify the value of Status column, the flow would not be fired.

 

The error message told that the value your provided within first parameter of Contains() function is Null, please check if you have filled proper value within Status column. 

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:1.JPG

Note: The Status column is a Choice type column in my SharePoint library.

 

If the value of Status column is not equal to "Submitted", the flow works successfully as below:3.JPG

If you change the value of Status column into "Submitted", the flow works successfully as below:2.JPG

 

Best regards,

Kris

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlanPilz
Level: Powered On

Re: SharePoint Document Library - How to check condition on Site Column

Kris

 

Thanks for your feedback. I needed to get the document library up and running in a rush so I deleted the "approval" process step for the time being so I can't share this with you at the moment.

 

I am 100% sure the value I typed for the value was correct, and acknowledge the "When a file is created (properties only)" is not the best choice of trigger!

I am now creating a different solution which uses Workflow for content approval, and I hope I can use the Approval Status column to trigger an email when a document is Approved to notify a group of people to do something?

 

I am looking to follow the same principle but instead of using a custom column use the "Approval Status" column that is managed by the Workflow and Content Approval process built in to SharePoint.

 

However I can't see the column heading "Approval Status" in this test document library?

 

I have a simple test that sends an email when an items is modified but the list of properties available to define the condition does not include the Approval Status.HELP!

 

 

 

AlanPilz
Level: Powered On

Re: SharePoint Document Library - How to check condition on Site Column

Kris,

 

Just to confirm I recreated the column "Status" again and this time it is working as expected. The only thing I did differently before was that I was using When a files is created (properties only)..

 

 

Still need some feedback on how to trigger a flow AFTER a document has been approved using a standard Approval Workflow?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,473)