Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

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

(0) ShareShare
ReportReport
Posted on by

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.

  • v-yamao-msft Profile Picture
    on at
    Re: Unable to Properly Parse "&&" (ampersand) within odata Filter Query

    Hi @Anonymous ,

     

    Thanks for updating and sharing.

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

     

    Best regards,

    Mabel

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    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.

  • Community Power Platform Member Profile Picture
    on at
    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.

  • v-yamao-msft Profile Picture
    on at
    Re: Unable to Properly Parse "&&" (ampersand) within odata Filter Query

    Hi @Anonymous ,

     

    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 Power Platform Member Profile Picture
    on at
    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.

  • Brad_Groux Profile Picture
    4,556 on at
    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!

  • efialttes Profile Picture
    14,756 on at
    Re: Unable to Properly Parse "&&" (ampersand) within odata Filter Query

    @Anonymous 

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,962 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow