Hi,
I have a SharePoint list with columns location and group. In PowerApps UI, I have two dropdowns Location and Group.
When user selects a Location, the Group dropdown should automatically show all the values for that particular location.
I have written the below code in Group dropdown items property. However it shows only 1 Group (Group 2)
Location"IND- BNG Bangalore" is tied to 2 groups in SharePoint list. Any idea how to get the Group 3 in the dropdown ? PFB screenshots
LookUp(Employees,DataCardValue8_1.Selected.Result in 'Location Name:LocationName'.Value).Group
Solved! Go to Solution.
Hi @Iantaylor0290 ,
Have you set the two combo boxes' Items like what I recommended?
combo box's Items for LocationName:
Distinct(Locations,LocationName)
combo box's Items for Group:
Distinct(Employees,Group)
Then choose primary text here:
Best regards,
Have you tried;
Distinct (Employee,Group)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24
My requirement is to filter based on locations. If I choose Location as IND- BNG Bangalore, Group combobox should be automatically populated with Group 2, Group 3. I used below formula in Items property but somehow the filtering shows blank records. Its getting records but displaying transparent
Filter(Employees,DataCardValue8_1.Selected.Result in 'Location Name'.Value).Group
Even when i use distinct(employee,group) the combo box is transparent. Records is showing filled with blank space
Can you share the formula on the location dropdown?
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24
Distinct(Locations,LocationName).Result.
Location dropdown I am retrieving from Locations list
Employees list contain Location Name as the lookup column
Filter(Employees,Location in DataCardValue8_1.Selected.Result)
Or
Filter(Employees,Location.Value in DataCardValue8_1.Selected.Result)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @Iantaylor0290 ,
I'm a little confused, whether you use two combo boxes or two drop downs?
Please check that. I assume that you mean two combo boxes.
Do you want to display related groups as the group combo box's defaultselecteditems?
Could you tell me the data type of LocationName field?
Based on the screenshoots that you provided, it looks like a lookup field.
If so, whether it allows multiple selections?
Whether you have records that are over 500 or 2000?
If it is a lookup field that not allows multiple selections, please set like this:
combo box's Items for LocationName:
Distinct(Locations,LocationName)
combo box's Items for Group:
Distinct(Employees,Group)
combo box's DefaultSelectedItems:
Distinct(
Filter(Employees,DataCardValue8_1.Selected.Result='Location Name'.Value),
Group
)
Do not forget to select Result as the combo box's primary text.
Do you have delegation warning? If the problem still exists, then that should be a delegation problem.
You could try to change delegation limit to 2000.
Best regards,