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

The expression "..." is not valid

Hi,

 

I am trying to use the Filter query of Get Items to filter if a list column's date input is ge than today and le today+30 days.

The Date's column name is "Due Date of Calibration" without quotes of course.

With that in mind, I believe the filter should go as follows:

filter.png

When testing the run, it errors out at this step with the error: "The expression "Due_x0020_Date_x0020_of_x0020_Calibration ge '2019-01-28T17:53:41.6062560Z' and Due_x0020_Date_x0020_of_x0020_Calibration le '" is not valid.
clientRequestId: 3cedc535-e765-4d74-af1f-5df4536a6b7b
serviceRequestId: 547cba9e-007c-7000-d819-5414f99bcd86" 

I have tried putting single quotes around the column name and that did not work either.

 

My current workaround is to have no filter query and just do a condition instead but I would like to know if there's a way to make this query work.

date.PNG

Any thoughts?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: The expression "..." is not valid

Hi EmmanS,

I think the issue is that in flow, the Filter Query can’t identify the column name with spaces.

In MS Flow, when you use a Data Name with spaces, it will change to another code randomly.

First, you can make a test to get the value of the list to get code of Due Date of Calibration in flow.

I have made a same flow as yours below: As you can see, the name of Due Date of Calibration has Changed to fqeh.

Then used the fqeh in the filter Query, it works will.

The expression is: fqeh ge ’formatDateTime(utcNow(),'yyyy-MM-dd')’ and fqeh le ‘addDays(utcNow(),30,'yyyy-MM-dd')

1.png2.png3.png

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

3 REPLIES 3
Highlighted
Helper V
Helper V

Re: The expression "..." is not valid

@EmmanS

I have issues similar to you in filtering date columns in a SP list.  I cannot get it to work.

Regards,

Andrew

 

Highlighted
Solution Sage
Solution Sage

Re: The expression "..." is not valid

Hi EmmanS,

I think the issue is that in flow, the Filter Query can’t identify the column name with spaces.

In MS Flow, when you use a Data Name with spaces, it will change to another code randomly.

First, you can make a test to get the value of the list to get code of Due Date of Calibration in flow.

I have made a same flow as yours below: As you can see, the name of Due Date of Calibration has Changed to fqeh.

Then used the fqeh in the filter Query, it works will.

The expression is: fqeh ge ’formatDateTime(utcNow(),'yyyy-MM-dd')’ and fqeh le ‘addDays(utcNow(),30,'yyyy-MM-dd')

1.png2.png3.png

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

Highlighted
Frequent Visitor

Re: The expression "..." is not valid

Hi @v-zhos-msft,

 

Thanks for the help! I double checked the name and it looks like its "code" name has some character limits as per the screenshot below. I have tested the flow using the correct variable for the column and the query now works.

works.png

Thanks again for the help, appreciate it!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,290)