how to filter gallery in PowerApps from the SharePoint list which has Choice column. when i use the StartsWith function, it is not showing the Choice column, only Text columns are available to select. is there any workaround to overcome this issue.
Solved! Go to Solution.
In your post you have said it's a choice column and in one of the reply you are saying it's a person type column. BOth are complex type column. And starts with only works on Text type column. For that you need to use AddColumns function in your gallery item code. For eg.
Filter(AddColumns(ListName,"NameTxt",'Name of individual to be released'.DisplayName),StartsWith(NameTxt,TextInput1.Text))
What above code does is add a column named "NameTxt" in you gallery source list at run time(No It doesn't effect your actual database). Now this added column holds DisplayName from your person type column. And now you can use Startswith Function on that column as you wished. I am adding a link. They are very useful fucntion.
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping
Hello @Prabhu_Rajaram
I think it's because you have added the column which modifies the structure of your Gallery items that is something different to your form on the side. Try using this:
Filter('Engagement Release Form',StartsWith('Name of individual to be released'.DisplayName,TextInput1.Text) || StartsWith('Name of Client',TextInput1.Text))
✔️ | Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸 bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Hello @Prabhu_Rajaram
Can you please help me understand your solution by sending details/screenshots of your SharePoint lists and the screen of your PowerApps? that would help me provide you a better solution
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
below is the column i have in SharePoint, where "Name of individual to be released" is type of Person or Group.
i have 2 screens in PowerApps, "UserScreen" and "EditScreen". In Userscreen, user will submit the form by selecting the name from dropdown on "Name of individual..." field.
in EditScreen, i have gallery linked with this Sharepoint list, i have to filter gallery from search text box by the "Name..."
i use Startswith function to filter the gallery, but it is not showing this particular field to search.
StartsWith('Name of individual to be released',TextInput1.Text)
In your post you have said it's a choice column and in one of the reply you are saying it's a person type column. BOth are complex type column. And starts with only works on Text type column. For that you need to use AddColumns function in your gallery item code. For eg.
Filter(AddColumns(ListName,"NameTxt",'Name of individual to be released'.DisplayName),StartsWith(NameTxt,TextInput1.Text))
What above code does is add a column named "NameTxt" in you gallery source list at run time(No It doesn't effect your actual database). Now this added column holds DisplayName from your person type column. And now you can use Startswith Function on that column as you wished. I am adding a link. They are very useful fucntion.
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping
Hello @Prabhu_Rajaram
EDIT: the answer of @zmansuri is also right.
This would be the code:
Filter('Name_of_your_list',StartsWith('Name of individual to be released'.DisplayName,TextInput1.Text))
Another way of doing it would be using Search just in case you want to search the middle parts of the name.
Search(AddColumns('Name_of_your_list',"namereleaseto",'Name of individual to be released'.DisplayName),TextInput1.Text,"namereleaseto")
✔️ | Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸 bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Hello @Prabhu_Rajaram
This would be the code:
Filter('Name_of_your_list',StartsWith('Name of individual to be released'.DisplayName,TextInput1.Text))
Another way of doing it would be using Search just in case you want to search the middle parts of the name.
Search(AddColumns('Name_of_your_list',"namereleaseto",'Name of individual to be released'.DisplayName),TextInput1.Text,"namereleaseto")
✔️ | Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸 bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
awesome, this works really well. thank you so much!!!
hi Zmansuri, the above function is working fine to filter in gallery, but it looks there is another issue comes now. in preview mode Form is not loading as per gallery selection.
I have applied Item property as Gallery1.Selected (it's a Gallery name).
Below is the Items Property i used in Item Property to filter the gallery.
Hello @Prabhu_Rajaram
I think it's because you have added the column which modifies the structure of your Gallery items that is something different to your form on the side. Try using this:
Filter('Engagement Release Form',StartsWith('Name of individual to be released'.DisplayName,TextInput1.Text) || StartsWith('Name of Client',TextInput1.Text))
✔️ | Just in case you think my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸 bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
wow great, it works really well!!! thank you so much.