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

Unable to Properly Parse "&" (ampersand) within odata Filter Query

Hello,

 

I am retrieve an Outlook event which has the Subject of "P&G: CaaS 1.5 NA - Deployments - Brantford - Go/No-go."  My Filter Query is: Subject eq 'P%26G: CaaS 1.5 NA - Deployments - Brantford - Go/No-go'

The "&" (ampersand) was breaking the query, so I replaced it with the %26.  However, no results are returned.

 

I created another event with the name: PG: CaaS 1.5 NA - Deployments - Brantford - Go/No-go

This time everything worked normally.

 

Does anyone know how best to build the Filter Query within Flow for this situation?  (Subject is random, sometimes containing the "&" and other times not.)

 

All help is appreciated.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
DougMyers
Level: Powered On

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Problem has been resolved using the original odata Filter Query.  The '&' (ampersand) had to be substituted with '%26' but none of the other characters required substituition.

 

Other than the '&' (ampersand) issue, the other thing that I discovered was that the event was not being found because it was part of a series with a different Subject.  I changed one meeting within the series to a different Subject, and that Subject was what I was trying to find with the Filter Query.

 

Thanks everyone for the clues that helped me reach a fix.

 

Cheers.

View solution in original post

7 REPLIES 7
Dual Super User
Dual Super User

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

@DougMyers 

Have yo tried with a "Filter Array" action block instead of an ODATA Filter Query? It is less efficient, but sometimes more powerful

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Super User
Super User

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

These are the characters that need to be converted for an ODATA filter query:

/Separates directories and subdirectories.%2F
?Separates the actual URL and the parameters.%3F
%Specifies special characters.%25
#Indicates bookmarks.%23
&Separator between parameters specified in the URL%26

You need to also converted the / in Go/No-go, like so:

Subject eq 'P%26G: CaaS 1.5 NA - Deployments - Brantford - Go%2FNo-go'

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

DougMyers
Level: Powered On

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Thank you for the insight.  The Filter Query is still not finding the match.  I have replaced the special characters, including the ':' with hex-equivelants.  Here's the new string:

 

Subject eq 'P%26G%3a CaaS 1.5 NA - Deployments - Brantford - Go%2fNo-go'

 

The method isn't complaining; it simply does not return a result.

 

Capture.PNG

 

More insight?

 

Cheers.

Community Support Team
Community Support Team

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Hi @DougMyers ,

 

The issue could be reproduced by me.

 

I am trying to figure out a solution for it.

 

As an alternative way, please use Filter array instead, which will filter out the expected result for you as well.

1.PNG

 

Best regards,

Mabel

 

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

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Thank you for the concept.  I must be doing something worng because I am still getting every event on my calendar and not just the one unique event.

 

When I examine the Filter Array, I see Body [ ] as the output.  Is this the single event ID I am seeking so that I can act upon it with a Send email?

 

Your insight is appreciated and anticipate.

 

Cheers.

Highlighted
DougMyers
Level: Powered On

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Problem has been resolved using the original odata Filter Query.  The '&' (ampersand) had to be substituted with '%26' but none of the other characters required substituition.

 

Other than the '&' (ampersand) issue, the other thing that I discovered was that the event was not being found because it was part of a series with a different Subject.  I changed one meeting within the series to a different Subject, and that Subject was what I was trying to find with the Filter Query.

 

Thanks everyone for the clues that helped me reach a fix.

 

Cheers.

View solution in original post

Community Support Team
Community Support Team

Re: Unable to Properly Parse "&" (ampersand) within odata Filter Query

Hi @DougMyers ,

 

Thanks for updating and sharing.

I am glad to hear that the issue has been resolved.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (4,364)