cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Users online (15,632)