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

Syntax Error when Querying Azure Table

Hi Community,

 

I followed this Microsoft Blog on Lead Management Instructions to use a Flow to monitor and send notification based on an Azure Storage Table. There seems to be some minor differences on the documentation and the actual Flow application; but I still managed to create the Flow.

 

But When I ran the flow, it returned some syntax error in the "Get Entities" step, so the Flow failed. Is there anything about the syntax I can fix on this step?

 

Flow Error on Azure Table.png

Thanks in advance,

Jimmy

1 ACCEPTED SOLUTION

Accepted Solutions
Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi Community,

 

After reaching out to the Support team and running some tests, this Flow is running for us now.

 

Just sharing an update in case others run into this case.

 

1. Flow likes to have a "datetime" type column specified in the "Filter Query". 

The screenshot on the left below is from the Microsoft Doc instruction, which didn't work for me. The screenshot on the right is the working version which I added the "Timestamp" column name:

 

flow-0.png

 

 

2. There are two "datetime" type columns in our Azure table. Flow actually likes the "Timestamp" column more than the "CreatedTime" column in our case.

 

flow-1.png

Hope it helps.

 

A special thanks to Mr. Corey Hanson from the Partner Support team!

 

Cheers,

Jimmy

View solution in original post

12 REPLIES 12
Community Support Team
Community Support Team

Re: Syntax Error when Qureying Azure Table

Hi @Jimmy1,

 

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

Could you provide the details of the expression or formula you configured in Get entities action?

I don't know your specific configuration, I can't reproduce a similar issue on my side.

Please provide more details and we would provide proper workaround for you.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hello Barry,

 

Thanks for the reply. I did some other attempts yesterday, but got the similar syntax error outcome. Please see my setup below:

 

- In the Recurrence window, keep the default setting of 1 for Interval. From the Frequency dropdown list, select Hour:

8 Recurrence.png

 

 

In the Get past time window, set the Interval to 1. From the Time unit dropdown list, select Hour.9 Get past time.png

 

 

- In the Get entities window, provide information for the Table and Filter Query fields. Here is where the error returned. And the next Condition step is also stopped.

 

Flow Error on Azure Table.png

 

 

 

My settings of the above two steps:Settings.png

 

The last Send Email step is just for my test email address. And since it didn't get through to that step, I will skip that setting box.

 

 

Let me know if I am missing anything. Thank you very much in advance.

Jimmy

 

 

 

 

Highlighted
Community Support Team
Community Support Team

Re: Syntax Error when Qureying Azure Table

Hi @Jimmy1,

 

From the screenshot you provided, the problem is in the configuration of Filter Query.

Is "datetime" a field in the entity?

If this is the case, the syntax you configured is wrong. The syntax configured in Filter Query should look like this:

Column gt ‘Value’

Image reference:

69.PNG

You could try configuring: datetime gt ‘Past Time’.

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi Barry,

 

Thanks for the reply. I am new to Flow so not familiar with the syntax. I followed the post and thought "datetime" was a function to convert the data type, but didn't think of it is referring to a column. 

 

The syntax I was using is actually from this post - Lead Management Instructions Azure Table. I was using the "Dynamics Content" tab instead of "Expression" tab in the blue box. Did you mean the syntax mentioned in this post is not up-to-dated anymore? 

 

MS post.png

 

 

Back to my test, I checked our table and there are actually two date/time columns. I updated my Flow using the "CreatedTime" column with your suggested syntax: 

 

CreatedTime Setting.png

 

Then I went through the AppSource to create a test record in my Azure table:

 

column example.png

 

The error seemed to be gone but the Flow didn't capture the expected record to trigger the next step. You can tell that my test record date/time value pushed into the table is "2018-12-21 17:50:19"; the Filter Query captured  date/time value is "2018-12-21 17:51:48". But the Flow didn't retrieve the record to process. Am I still missing anything? Do I need to update any syntax to satisfy the Output section?

 

CreatedTime Test Run.png

 

 

Thanks again for the help in advance,

Jimmy

 

Community Support Team
Community Support Team

Re: Syntax Error when Qureying Azure Table

Hi @Jimmy1,

 

You configure Filter Query like this, the syntax is no problem.

The reason why you don't get the expected results is because there is a delay in the execution of each action of Flow, so the judgment to the minute or second level may not be particularly accurate.

Similar to your use of Get past time, but the output time will be tens of seconds, which affects the minute.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi Barry,

 

Hope you are doing well and Happy Belated New Year!

 

I understand that there could be some delay on the judgement based on the time difference from your last reply. But after some observations, I feel like I am still missing something to make my Flow work as expected. I am working on some Power BI projects too so I feel that understanding how Flow works will be helpful in some data integration scenarios.

 

Back to my Flow test, in the Azure table, I can tell there are two more records added today after my test record on Dec 21st 2018. However, I didn't receive any email for the day so far. Flow 2019-01-04-01.png

 

 

When I checked the Flow run history, it showes all runs are "succeeded". 

Flow 2019-01-04-02.png

 

I then downloaded the csv version of the run history, but found that although the runs are successful, the last step "Send an Notification Email" is always skipped for each run:Flow 2019-01-04-03.png

 

 

When I open one of the runs, I see this. My guess is that the Flow doesn't capture anything in the "Get Entities" step, so the "Outputs" field returns blank. And then it goes to "do nothing" in the condition step. 

 

 

Flow 2019-01-04-04.png

 

   Flow 2019-01-04-04.png

 

Please advice and thank you for your help in advance.

 

Thanks,

Jimmy

Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi Community,

 

After reaching out to the Support team and running some tests, this Flow is running for us now.

 

Just sharing an update in case others run into this case.

 

1. Flow likes to have a "datetime" type column specified in the "Filter Query". 

The screenshot on the left below is from the Microsoft Doc instruction, which didn't work for me. The screenshot on the right is the working version which I added the "Timestamp" column name:

 

flow-0.png

 

 

2. There are two "datetime" type columns in our Azure table. Flow actually likes the "Timestamp" column more than the "CreatedTime" column in our case.

 

flow-1.png

Hope it helps.

 

A special thanks to Mr. Corey Hanson from the Partner Support team!

 

Cheers,

Jimmy

View solution in original post

girishj
Level: Power Up

Re: Syntax Error when Qureying Azure Table

Thanks for the solution with screenshots, it has resolved issue

Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi @girishj,

I am just curious if you are also using Flow for the same scenario - connecting to an Azure lead table?

Thanks,

Jimmy

girishj
Level: Power Up

Re: Syntax Error when Qureying Azure Table

Yes, Also trying to figure out how to format out put data in tabular format. Do you have any idea on this?

Abduvali
Level: Power Up

Re: Syntax Error when Qureying Azure Table

Thanks, @Jimmy1!!! Very helpful was trying to solve that issue for days now =D

Jimmy1
Level: Powered On

Re: Syntax Error when Qureying Azure Table

Hi @girishj,

 

Sorry about the delay. I initailly thought about that after getting it working, but didn't get a way through.

 

In my case, ideally, AppSource will eventually push the lead to CRM; then CRM will handle the notification step. Using this Flow idea is a temporary solution.

 

I recall the challege I was facing is the cusotmer info has been stuffed in one field with the "|" sign as the delimiter. If you have found a solution, please do share.

 

Thank you,

Jimmy

 

 

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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

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