cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amitlathia
Frequent Visitor

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
v-yuazh-msft
Community Support
Community Support

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

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,043)