web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ComboBox - ForAll and ...
Power Apps
Answered

ComboBox - ForAll and LookUp

(0) ShareShare
ReportReport
Posted on by 30

Hello,
I have a problem that, in my combobox has the Name to filter the collection to filter the Name_ID from another table.
So I'm trying to create something like this:

ClearCollect(colVault, Filter('mdf.Vault_Changes', Item_Reviewed = false || Item_Reviewed = Blank(), **** (right here ->) ***** Site_ID in LookUp(colSite, ForAll(cb_SiteName.SelectedItems) in Site_Name, Site_ID)));

But it's not working, I can make it works with ONE selected value from the combobox, but I want to have the possibility to pick more than one value.
Does anyone know how to fix this?

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @VictorMafra ,

     

    Based on your formula, I assume you would like to add a criteria in the first Filter function, i.e. get site IDs based on the selected site names in the Combo box. If so, please try below formula OnChange of the Combo box:

    Clear(colSiteIDs); 
    ForAll(cb_SiteName.SelectedItems.Site_Name As SN ,Collect(colSiteIDs,LookUp(colSite, SN.Site_Name = Site_Name, Site_ID));
    ClearCollect(colVault, Filter('mdf.Vault_Changes', Item_Reviewed = false || Item_Reviewed = Blank(), Site_ID in colSiteIDs.Site_ID))

     

    Best regards,

  • Verified answer
    VictorMafra Profile Picture
    30 on at

    Hello @v-jefferni ,

     

    I got it creating some support collections. I dont know why but the combobox SearchField is not able to use columns with number type.
    In the combobox I am just showing the site_name, and in the button to filter I have this code below:

     

    Clear(colSupport2);
    Clear(colGridData);
    Clear(colVault);
    
    ClearCollect(colSupport2, cb_SiteName.SelectedItems);
    
    ForAll(colSupport2, Collect(colVault, Filter('mdf.Vault_Changes',Item_Reviewed = false || Item_Reviewed = Blank(),Site_ID = colSupport2[@Site_ID])));
    
    ClearCollect(colGridData,AddColumns(colVault,"Site_Name",LookUp(colSite,Site_ID = colVault[@Site_ID],Site_Name),"Site_Acronym",LookUp(colSite,Site_ID = colVault[@Site_ID],Site_Acronym)))

     

     

    colSupport1 is the collection just with Site_Name and Site_ID. 

    This solution is working and whether I select all items in the combobox, it can give me a collection with more than 2000 rows too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard