cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Helper I
Helper I

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
Highlighted
Dual Super User III
Dual Super User III

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!



Highlighted
Super User II
Super User II

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!

Highlighted
Helper I
Helper I

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.

Highlighted
Community Support
Community Support

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.
Highlighted
Helper I
Helper I

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
Helper I
Helper I

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

Highlighted
Community Support
Community Support

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
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.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Users online (7,709)