Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Struggling to find the correct way to filter a combo box using Power Apps SharePoint Integration

Like (0) ShareShare
ReportReport
Posted on 15 Jan 2025 16:44:53 by 2
I have a SharePoint list that has a Power Apps form.
I want to filter a Combo Box that holds one of the lookup columns in the form. The filter is based on the value of another drop down in the form, but this dropdown is completely seperate from the SharePoint list and the data comes from another list entirely.
 
So creating the field in the form from scratch I change the "Items" from this:
Choices([@'Asset and Property Register'].'AssetType')
To this:
Filter('Asset and Property Types', Department.Value = cmbDepartment.Selected.Title)
 
This filters the list perfectly but the problem is when I submit the form, this field doesn't get populated and stays blank. I suspect its because the value it wants isn't exactly the same because of the change ve made to the "Items" but I'm not sure of a solution myself.
 
Thanks.
  • Verified answer
    mmbr1606 Profile Picture
    mmbr1606 10,320 on 15 Jan 2025 at 16:55:47
    Struggling to find the correct way to filter a combo box using Power Apps SharePoint Integration
    hey
     
     
    can u try thi approch:
     
    filter looks fine like:
    Filter('Asset and Property Types', Department.Value = cmbDepartment.Selected.Title)
    
    defaultselecteditem of combobox:
    If(
        !IsBlank(ThisItem.'AssetType'),
        LookUp('Asset and Property Types', ID = ThisItem.'AssetType'.Id)
    )
    
    use this for submitting/patch in the onselect of button:
    Patch(
        'Asset and Property Register',
        Defaults('Asset and Property Register'),
        {
            AssetType: LookUp(
                'Asset and Property Types',
                ID = cmbAssetType.Selected.ID
            )
        }
    )
    
    if it worked please mark as verified solution
     
     
     
    cheers

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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard
Loading started