web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint Filter AND/...
Power Automate
Unanswered

Sharepoint Filter AND/OR with Powerapps multiple parameters?

(0) ShareShare
ReportReport
Posted on by 1,097

How to handle Sharepoint Get Items connection with a odata filter that looks like this

screenshot: http://prntscr.com/pzaos5

 

startswith(Personnummer,'@{triggerBody()['Getitems_FilterQuery']}') and startswith(ReportYear,'@{triggerBody()['Getitems_FilterQuery_1']}') and startswith(RepportMonth,'@{triggerBody()['Getitems_FilterQuery_2']}')

 

Everything works as long as data are in the powerapp connectors.

But if any of them are empty, everything fails.

Why?

 

How to fix this, can i put in some error handler or if statement to fix this?

I dont get any errors when one or several of the parameters are empty... i just get nothing filtered, no result atall.

 

if i change from AND to OR

it does not really work anyway... since it then does not combine the different data to one filter, it just takes one of them and filters.

 

Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at
    Re: Sharepoint Filter AND/OR with Powerapps multiple parameters?

    If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you. The provided screenshot doesn't really give us enough of an idea to troubleshoot or reproduce. 

    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!

  • Oskarkuus Profile Picture
    1,097 on at
    Re: Sharepoint Filter AND/OR with Powerapps multiple parameters?

    Sure

    Here is a screenshot of my whole flow
    https://easycaptures.com/fs/uploaded/1423/6025685084.png 

     

     

     

     

     

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Sharepoint Filter AND/OR with Powerapps multiple parameters?

    Hi @Oskarkuus,

     

    You could try to use three Compose action to store the three parameters get from PowerApps, then use the outputs of composes to involve into the OData query, 

    startswith(Personnummer,'@{outputs('Compose')}') and startswith(ReportYear,'@{outputs('Compose_2')}') and startswith(RepportMonth,'@{outputs('Compose_3')}')

     Annotation 2019-11-20 135158.png

     

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

  • Oskarkuus Profile Picture
    1,097 on at
    Re: Sharepoint Filter AND/OR with Powerapps multiple parameters?

    No sadly it does not help.

    here is a link to a screenshot when flow is running.

     

    here is a link to the flow how it looks now

     

    startswith(Personnummer,'@{outputs('Compose')}') and startswith(ReportYear,'@{outputs('Compose_2')}') and startswith(RepportMonth,'@{outputs('Compose_3')}') 

     

    so the result is the same. when the parameters from Powerapps i get no result atall... i want the opposit to happen...

    if none of my filter parameters contain anything then get everything from the datasrouce (sp list).

    this is how the filter works in Powerapps when filtering a gallery... the idea is to have a button to export the result of the gallery, doing this by filtering the sp list the same way.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard