I have a SharePoint list for a datasource and that SP list has a choice field called "Account Coordinator" with the names of Account Coordinators.
I have placed this choice field onto a drop down list and would like to be able to:
To recap, I'd like to be able to choose an Account Coordinator from a choice drop down list in PowerApps and then further filter that to the customer name column, and have the results shown on a gallery on another screen.
The results on the gallery on that other screen would be to show all records for "Kathy Smith" with "Customer Name" sorted.
Solved! Go to Solution.
Hi @DS2,
Do you want to bind the search functionality to the Button controls in your app?
If you want to bind the search functionality to the Button controls in your app, I have made a test on my side, please take a try with the following workaround:
Within the Screen1, set the Items property of the Drop down control (Dropdown1) to following:
Choices('20190211_case5'.'Account Coordinator')
On your side, you should type:
Choices('YourSPList'.'Account Coordinator')
Set the OnSelect property of the "Filter" button ("Customer Name" button) to following:
ClearCollect( FilteredCollection, SortByColumns( Filter('YourSPList', 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */ "Customer_x0020_Name", Ascending ) ), Navigate(Screen2, ScreenTransition.Fade)
If the Customer Name column is a Choice type column in your SP List, please type:
ClearCollect( FilteredCollection, Sort( Filter('YourSPList', 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */ "Customer_x0020_Name".Value, Ascending ) ), Navigate(Screen2, ScreenTransition.Fade)
Within the Screen2, set the Items property of the Gallery to following:
FilteredCollection
Best regards,
Not sure what part you're having trouble with, but basically:
ddAccountCoordinator
Items: Choices('Account Coordinator').
btnViewCustomers
OnSelect: Navigate(scrCustomersByAccountCoordinator,ScreenTransition.None)
glryCustomersByAccountCoordinator
Items: Sort(Filter(MyDataSource,'Account Coordinator'=ddAccountCoordinator.Selected.Value),'Customer Name',SortOrder.Ascending)
Hi @DS2,
Could you please share a bit more about your app's configuration?
Based on the needs that you mentioned, I think the Filter function could achieve your needs. I have made a test on my side, please take a try with the following workaround:
Within the Screen1, set the Items property of the Drop down control (Dropdown1) to following:
Choices('20190211_case5'.'Account Coordinator')
On your side, you should type:
Choices('YourSPList'.'Account Coordinator')
Set the OnSelect property of the "Filter" button to following:
Navigate(Screen2, ScreenTransition.Fade)
Within the Screen2, set the Items property of the Gallery to following:
SortByColumns(
Filter('20190211_case5', 'Account Coordinator'.Value = Dropdown1.Selected.Value),
"Customer_x0020_Name",
Ascending
)
On your side, you should type:
SortByColumns(
Filter('YourSPList', 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */
"Customer_x0020_Name",
Ascending
)
Above formula may cause a Delegation warning issue within your app, in order to get rid of this warning issue, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following:
ClearCollect(RecordsCollection, 'YourSPList')
Within your other screen, set the Items property of the Gallery to following:
SortByColumns( Filter(RecordsCollection, 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */ "Customer_x0020_Name", Ascending )
More details about Filter function, please check the following article:
Best regards,
Thank you very much! This works. However, how can I tie the search to the button? I think it would be helpful to have other buttons (other than Customer Name) like Status or Director (these are all SharePoint Choice columns).
Hi @DS2,
Do you want to bind the search functionality to the Button controls in your app?
If you want to bind the search functionality to the Button controls in your app, I have made a test on my side, please take a try with the following workaround:
Within the Screen1, set the Items property of the Drop down control (Dropdown1) to following:
Choices('20190211_case5'.'Account Coordinator')
On your side, you should type:
Choices('YourSPList'.'Account Coordinator')
Set the OnSelect property of the "Filter" button ("Customer Name" button) to following:
ClearCollect( FilteredCollection, SortByColumns( Filter('YourSPList', 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */ "Customer_x0020_Name", Ascending ) ), Navigate(Screen2, ScreenTransition.Fade)
If the Customer Name column is a Choice type column in your SP List, please type:
ClearCollect( FilteredCollection, Sort( Filter('YourSPList', 'Account Coordinator'.Value = Dropdown1.Selected.Value), /* <-- Dropdown1 represents the Dropdown control in your previous screen */ "Customer_x0020_Name".Value, Ascending ) ), Navigate(Screen2, ScreenTransition.Fade)
Within the Screen2, set the Items property of the Gallery to following:
FilteredCollection
Best regards,
User | Count |
---|---|
138 | |
129 | |
76 | |
72 | |
70 |
User | Count |
---|---|
211 | |
200 | |
64 | |
63 | |
54 |