Hello!
I have an app that has an Excel table as the backend data source.
Some of the fields are 'Customer Name', 'Location Name' and 'Device Name'. I have a Combo Box in PowerApps that has Customer Names, this, in turn, filters the Data Table in PowerApps to show the devices and locations only specific for that customer.
The user can then select multiple 'Devices Names' in a separate Combo Box, this works fine, and I have a Concat function that splits out the Devices Names from the Combo Box.
This leaves a column in the Data Table called 'Location Name', I want to be able to do the exact same Concat function I did on the Combo Box, so the locations will list (eg, Location A, Location B, Location C) this can be in any order.
Any suggestions are greatly appreciated!
Thanks in Advanced
Andy!
Excellent. I'm glad I could help.
Thank you very much for your help Sir!
You have solved my 8+hrs of hair pulling!
Thank you very much!!
Just remove the distinct column from Items. .'Device Name'
Set Device Name as the Display and Search Fields.
lol I feel like we are getting somewhere! Thanks for your help so far its really appricated!
The Items field of the 'Please select the devices(s):' box is the attachment Capture.png. The 'BackendDatabase' is the Excel sheet and we are only collecting the 'Device Name' field. So technically your code works, but I am unable to collect the 'Device Location' Field on the OnChange property!
If I can have it link the Device Name to Location Name in the background then we've got it!
Im not sure of anything...lol
Try this...
In your combobox On Change property: ClearCollect(Collection, DeviceNameInput.SelectedItems.'Device Location')
In your textbox/label Text property: Concat(Distinct(Collection, 'Device Location'),Result,", ")
I am using a standard Data Table within PowerApps called 'DataTable1', DataTable1's data source is a OneDrive Excel file
One the main screen I have a ComboBox saying 'What is the customer name'. This filters the Data Table to only show rows for that customer. (Attachment Capture.png).
So now I have a list of locations in DataTable1, in column 'Device Location'.
Those just need to be displayed in the text box, A, B, C, D etc. Are you sure Collecting the ComboBox is correct for this scenario? It seems my only option is to collect the 'Device Location' field in the DataTable1, but I am not sure this is possible?
(Attachment Capture1.png) shows the questions. The 'Please select the device(s)' field is also grabbing directly from the Excel data source and not the Power Apps 'DataTable1'.
Its all from the same SQL table, but you arent collecting from the datasource necessarily, you're collecting from the combobox selected items. In your previous post you were trying to collect from your datatable directly.
What is your data source of the brand family data table and also the combo box?
I wonder if perhaps I cannot do the SelectedItems because it is a multi-column table?
EDIT: It seems even when using a single column data table I still cannot set the Item property of the combo box to 'Device Location'
I have the combo box set to Item Name, but I'm collecting the Brand Family of the Selected Items On Change of the combo box.
Then I'm concatenating the distinct results of my collection in to a label.
You can see here that there are duplicates in the collection.
I was trying this earlier, but for some reason SelectedItems is not an option for the DataTable?
See attached for OnChange property.
WarrenBelz
58
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36