cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Filter or Search function within Powerapps. Connected to Sharepoint

I am trying to filter my gallery by name which is ThisItem.'Standard Endorser'   and by Department which is ThisItem.'Department'. My powerapps is connect to a Sharepoint list. How do I create this filter within the gallery and the result will be inputted within the data fields to the right in my screenshot (and more).

4 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

OK @pnass001 ,

I will assume for the moment that  'Standards Selection Form Data Collection' is the list name and that you have already configured the form to display the item selected from the list.

Change YourSearchboxName below to your actual name for text box.

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      YourSearchboxName.Text
   ),
   StartsWith(
      'Department',
      YourSearchboxName.Text
   )
)

You also need to make the Default of your search box "" (double quotes) for this to display when there is nothing in the search box.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Re: Filter or Search function within Powerapps. Connected to Sharepoint

Hi @pnass001 ,

Just want to supplement his answer @WarrenBelz .

Do you want to filter the gallery based on text in search box (Standard Endorser and Department field) and display selected item in the edit form?

If so, you need to set these properties:

1)gallery's Items:

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      YourSearchboxName.Text
   ),
   StartsWith(
      'Department',
      YourSearchboxName.Text
   )
)

YourSearchboxName is the search box name, please replace with yours.

2)set edit form's data source to 'Standards Selection Form Data Collection'

set edit form's DefaultMode:FormMode.Edit

set edit form's Item:

Gallery1.Selected

//please replace with your gallery name, I assume as Gallery1.

 

 

Best regards,

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

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@pnass001 ,

Can you please provide the Items code of your gallery - please provide in text (not screenshot)

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

Hi @pnass001,

Something strange here as I use this syntax as well, but this should work

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      FilterTextBox.Text
   ) ||
   StartsWith(
      'Department',
      FilterTextBox.Text
   )
)

Note however you will possibly need to select the item to have it display in the form.

View solution in original post

12 REPLIES 12
Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

Hi @pnass001 ,

I am not completely clear on your requirement and the result will be inputted within the data fields to the right in my screenshot

You have a form at the right that is selected from the gallery. You can certainly filter the gallery by either of both of those fields using the text box at the bottom and then select the item you want and it will be displayed in the form.

What currently is the Items property of your Gallery?

Highlighted
Post Patron
Post Patron

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@WarrenBelz 

 

You said it correctly with "selected the item and it will be displayed in the form." I want to filter to select an a certain item.

 

Items property for Gallery is 'Standards Selection Form Data Collection'

Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

OK @pnass001 ,

I will assume for the moment that  'Standards Selection Form Data Collection' is the list name and that you have already configured the form to display the item selected from the list.

Change YourSearchboxName below to your actual name for text box.

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      YourSearchboxName.Text
   ),
   StartsWith(
      'Department',
      YourSearchboxName.Text
   )
)

You also need to make the Default of your search box "" (double quotes) for this to display when there is nothing in the search box.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Re: Filter or Search function within Powerapps. Connected to Sharepoint

Hi @pnass001 ,

Just want to supplement his answer @WarrenBelz .

Do you want to filter the gallery based on text in search box (Standard Endorser and Department field) and display selected item in the edit form?

If so, you need to set these properties:

1)gallery's Items:

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      YourSearchboxName.Text
   ),
   StartsWith(
      'Department',
      YourSearchboxName.Text
   )
)

YourSearchboxName is the search box name, please replace with yours.

2)set edit form's data source to 'Standards Selection Form Data Collection'

set edit form's DefaultMode:FormMode.Edit

set edit form's Item:

Gallery1.Selected

//please replace with your gallery name, I assume as Gallery1.

 

 

Best regards,

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

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@WarrenBelz 

 

Okay, I inputted code and no errors, but when I search by 'Standard Endorser,' gallery items disappear.

 

 

 

 

Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@pnass001 ,

Can you please provide the Items code of your gallery - please provide in text (not screenshot)

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@WarrenBelz 

 

Code for Items in Gallery:

Filter(
'Standards Selection Form Data Collection',
StartsWith(
'Standard Endorser',
FilterTextBox.Text
),
StartsWith(
'Department',
FilterTextBox.Text
)
)

 

and I inputted what the Microsoft community helper said to add within the form's properties.

Highlighted
Post Patron
Post Patron

Re: Filter or Search function within Powerapps. Connected to Sharepoint

@WarrenBelz 

 

Wondering if you got to this yet? Thanks 

Highlighted
Community Champion
Community Champion

Re: Filter or Search function within Powerapps. Connected to Sharepoint

Thanks @pnass001 ,

I am in a different time zone (7:30am Thursday morning here in Oz)

What is not working in this?

Filter(
   'Standards Selection Form Data Collection',
   StartsWith(
      'Standard Endorser',
      FilterTextBox.Text
   ),
   StartsWith(
      'Department',
      FilterTextBox.Text
   )
)

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,822)