cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

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
Community Support
Community Support

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.

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!

 

 

 

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (81,164)