cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bpironet
New Member

Flow with action "SharePoint: Get file properties" doesn't have access to custom Library Columns

Dear all,

 

I created a flow with a trigger on "SharePoint: When a new document is created". 

My idea is to wait for a couple of hours and if the author did not fill-in the mandatory metadata, I would like the flow to send a reminder email in a loop with a delay and a new check until the user complete the metadata. 

 

Here is my flow (sorry for french version): 

2018-02-22_134614.png

 

So, my issue is that after using the "SharePoint: Get file properties" (to get the updated version of the file properties), I try to use them in a debug email but my custom mandatory column is not available. You can see the error message saying that "the property "NumberTest" does not exist" but I was able to select it in the available properties in the flow editor interface. 

 

So, is it because the column is empty or is it a bug? Anyway, even if the column is empty, an empty value should be shown. 

 

Do you know if anybody else had this specific issue? A workaround could be developed with Azure functions and HTTP calls but that would be too complex when a simple action should work for it. 

 

Thank you in advance,

Benoit Pironet

8 REPLIES 8
v-xida-msft
Community Support
Community Support

Hi @Bpironet,

 

Could you please show a bit more about the "Send an email" action within your flow?

Could you please share a bit more about the custom column ("NumberTest") in your SharePoint library?

Could you please translate the error message into english language?

Further, do you use WDL expression to get the custom mandatory property within the "Send an email" action of your flow?

 

If you want to use WDL expression to get the custom mandatory property from "Get file properties" action within the "Send an email" action of your flow, please take a try with the following formula (WDL expression):

body('Get_file_properties')?['PropertyName']

Note: Do not ignore the ? symbol within your formula.

 

If you could provide more details about the questions I ask above, I would provide a proper workaround for you.

 

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.

Not wanting to hijack someone elses thread but I think I'm having the same problem. Which I posted about here:

 

https://powerusers.microsoft.com/t5/Building-Flows/Do-Until-Get-File-Properties-InvalidTemplate/td-p...

 

And I posted in the techcommunity because I cannot add images to my posts on this forum:

 

https://techcommunity.microsoft.com/t5/PowerApps-Flow/Do-Until-Get-File-Properties-Invalid-Template/...

 

I think I know what is happenning but not why. Which is that the 'Get file properties' action (and associated trigger) do not output custom columns which don't have a default value. Unless it is a person/group column. I can work around this by using default values in the columns but this is not my preferred solution.

 

Perhaps there is way to trap whether a column exists in the output (coalesce?) but I don't know how yet.

 

I hope this helps somewhat.

 

Ian.

In case it helps, I solved my InvalidTemplate error by using coalesce in my Do Until condition. For example:

 

@and(not(empty(body('Get_file_properties')?['Approver'])),not(equals(coalesce(body('Get_file_properties')?['InvoiceAmountExclGST'], '0'), '0')),not(equals(coalesce(body('Get_file_properties')?['InvoiceDate'], '19000101'), '19000101')),not(equals(coalesce(body('Get_file_properties')?['InvoiceFrom'], 'Nobody'), 'Nobody')),not(equals(coalesce(body('Get_file_properties')?['InvoiceNumber'], '0'), '0')))

Ian.

joeyflynn
New Member

Figured worth asking but any chance you are willing to share that flow?  I am looking to do the same thing for required metadata.

Hello @joeyflynn. I'm presuming that you are referring to my flow using the coalesce function. I guess my TechCommunity post was not detailed enough. Its been awhile but I will see if I can find the flow and post here in more detail.

joeyflynn
New Member

I was hoping you might want to share the flow for checking on required metadata. Ibam looking to do the same thing with have reoccurring check for required metadata

I'm sorry but I cannot find that flow anymore. It was just a test/learning exercise which I probably deleted after I'd finished with it. But you should be able to re-create it very quickly for your purpose based on my TechCommunity post. Basically, if I understand it correctly, the coalesce function will substitute a value for an empty column so that you can actually test that value in a condition. Otherwise, while I'm very far from a Flow expert, I can try to help if you are having problems. Are you getting an error in your flow?

I used ianm's coalesce function to make my required metadata check work and am SO thankful. My document checks are these:

 

@or(not(equals(coalesce(body('Get_file_properties')?['ApplicantID'], null),null)),not(equals(coalesce(body('Get_file_properties')?['HRDocType']?['Value'],null), null)))

 

@or(equals(coalesce(body('Get_file_properties')?['ApplicantID'], null),null),equals(coalesce(body('Get_file_properties')?['HRDocType']?['Value'],null), null))

 

And here is the flow snippet:

checkflow.png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,838)