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).
Solved! Go to Solution.
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.
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,
Can you please provide the Items code of your gallery - please provide in text (not screenshot)
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.
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?
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'
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.
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,
Okay, I inputted code and no errors, but when I search by 'Standard Endorser,' gallery items disappear.
Can you please provide the Items code of your gallery - please provide in text (not screenshot)
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.
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
)
)