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

Flow suddenly started failing due to what appears to be blank fields

I created a flow which does the following:

 

  • Recurrance (weekly)
  • Get Items from sharepoint list
  • Operations - Select (to choose specific columns for each item)
  • Operations - Create CSV Table
  • Send Email (attach CSV Table and send email)

 

This was working fine, and all of a sudden I have started to get InvalidTemplate errors which suggest a property is missing. I recreated a smaller list with the same columns to test what might be wrong and the error seems to occur when there is no data in a particular column for any item. 

 

This seems to be a bug as when it was working there were blank fields coming through onto the CSV, but all of a sudden it is no longer working. Any assistance or workarounds would be appreciated. Happy to provide a link to the flow for investigation purposes.

 

Amit

2 REPLIES 2
Community Support Team
Community Support Team

Re: Flow suddenly started failing due to what appears to be blank fields

Hi @amitlathia,

 

Could you please share a screenshot of the configuration of your flow?

Could you please share more details about your sharepoint list?

Could you please share more details about which column would have empty value in your csv table and what is the type of the column?

 

I have made a test on my side and the issue is confirmed on my side,set a empty property in select action is not supported in microsoft flow.

 

If I would create a csv table and a single line of text column (quantity)might have a empty value as below:

Capture.PNG

 

The flow would run failed in the Select action as below:

Capture.PNG

 

I would add an if() expression to set the value to null if the value is empty as screenshot below:

Capture.PNG

 

The expression of quanyity as below:

if(empty(item()?['quantity']),item()?['quantity'],null)

The flow would run successfully as below:

Capture.PNG

 

 

Please let me know if your problem could be solved.

 

Best regards,

Alice

Highlighted
amitlathia
Level: Powered On

Re: Flow suddenly started failing due to what appears to be blank fields

Thanks Alice @v-yuazh-msft, this does work partially. What I am finding however is using the if statement expression provided does insert null values, however as it then overides the whole column with null values once it has seen one item has had a blank field.

 

i.e. if item 1 was empty for the column 'quantity' but item 2 had a value, the CSV shows both items to be null.

 

Any suggestions on how to further expand the suggested expression so that it checks each item and applies a null value only if required?

 

Many thanks in advance for your help.

 

p.s. I also found that for certain column types such as currency the string expression needs to be used in front of item i.e. if(empty(string(item()?....

 

Amit

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 42 members 4,573 guests
Please welcome our newest community members: