cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dmistry
Level 8

Select query throws an error

Hi,

 

I have a Task List setup in SharePoint online and using Flow I am sending an email out to a user detailing all the tasks assigned to him/her in just one email and it works perfectly and sends me an email out similar to below:

FlowStarted.JPG                                                                                       

 

As you see, I am using OOTB SPO task list fields to include in my email. Here is a link to the reference I used to setup flow: https://powerusers.microsoft.com/t5/General-Flow-Discussion/microsoft-flow-get-all-items-with-distin... , its an exact replica.

 

Now I added some custom metadata choice columns to the SP task listas following: The value in parenthesis depicts internal name in SPO and I have also mentioned the expression formula I used for each fields.

 

Brand Name: item()?['Brand_x0020_Name']?['Value']
Guiding Document (Guiding_x0020_Document) :item()?['Guiding_x0020_Document']?['Value']
Document Section (Document_x0020_Section) :item()?['Document_x0020_Section']?['Value']
Investor: item()?['Investor']?['Value']

 

SelectAction.JPG

All of the above columns are of type choice. So I also updated my select action and added these columns so that I can see the info in email I receive. Unfortunately the flow is failing and I am seeing below error.

FlowFailed.JPG

 

This could probably due to maybe (I am assuming) I am using wrong condition expression but I am not able to solve this. Also once I remove all of these column fields from Select action and keep Task Name, Task Description, Due Date then the flow works fine again. So to conclude I think something is off in regards to the choice column formuals I added, flow is not reading that. 

Can someone please help me correct what I am doing wrong here. Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
dmistry
Level 8

Re: Select query throws an error

@v-zhos-msft,

 

I think I figured it out. There was an issue with the expression formula.

I was using following Brand Name: item()?['Brand_x0020_Name']?['Value'], I simply changed it to  item()['Brand_x0020_Name']?['Value'] and it works now perfectly.


THanks for looking into this.

6 REPLIES 6
v-zhos-msft
Level 10

Re: Select query throws an error

Hi dmistry,

I think the problem is you can’t get the items from SP list, if there is a blank field in a column, an error “invalid template” will be returned when using the action Select. Please check your list to make sure there is no blank field. I have made a test on my side below:

1.png2.png

Please feel free post back if you need more help.

Best regards,

Zhonys

dmistry
Level 8

Re: Select query throws an error

@v-zhos-msft

Hi Zhonys,

 

Thanks for getting back so quickly. Unforunately its not working at all. I don't have any fields that is empty in task list. Once I add Brand name value card under select, it simply adds an appply to each block to the select action and the flow runs infinitely. It does not fail netiher succeeds, I will definitely need your help. Below are the flow and task list screenshots:

 

Also I have specified the flow link in the question description, my flow is an exact replica exception being some custom choice columns added. Please note that Investor, guiding Document, Brand name and document section are choice columns.

FlowScr1.JPGFlow 2.JPGFlow3.JPGFlow4.JPGtaskList.JPG

 P.S: The problem appears to be only having custom choice columns in use, as soon as I take them off, the flow works and sends email out.

dmistry
Level 8

Re: Select query throws an error

@v-zhos-msft

 

Hi,

 

Need your help please, any update?

v-zhos-msft
Level 10

Re: Select query throws an error

Hi demistry,

Sorry to reply you so late, I have made a same flow with you and the same problem has occurred. I need to search more data for this issue, I will give your suggestion later.

Regards

Zhongys 

dmistry
Level 8

Re: Select query throws an error

@v-zhos-msft

 

Appreciate the feedback Zhongys, thanks for looking into this. Will wait to hear from you.

Thanks again.

dmistry
Level 8

Re: Select query throws an error

@v-zhos-msft,

 

I think I figured it out. There was an issue with the expression formula.

I was using following Brand Name: item()?['Brand_x0020_Name']?['Value'], I simply changed it to  item()['Brand_x0020_Name']?['Value'] and it works now perfectly.


THanks for looking into this.

Helpful resources

Announcements
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!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

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!

Top Kudoed Authors
Users Online
Currently online: 67 members 4,693 guests
Please welcome our newest community members: