cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerAppsDawg
Frequent Visitor

Filtering a combobox by another combobox that uses a lookup column as a datasource

Hi all,

 

I have two comboboxes in a sharepoint form powerapp. The powerapp is drawn from a list that has a column " shared status" in it. Shared status is in list a and looked up from list B. Its a choice column.

 

What im trying to do is filter shared status by a secondary multi choice column in list A  via a combo box in the app. Effectively if Shared status matches the condition or conditions specified in the secondary column , its corresponding combo box reduces its choices down to match.

 

I thought it would be as simple as putting the below on the combo box I want to filter. But the results in the target are blank.

 

Filter(
'Stakeholder Requirements'.'Shared Status',
'Shared Status' in ComboBox1.SelectedItems.Value

 

can anyone advise ..

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@PowerAppsDawg,

Based on the issue that you mentioned, do you want to filter 'shared status' Combo Box choices based on another Combo Box?

Could you please share a bit more about the scnenario?

In my scenario, I have a SP list as below:qqq.png

Add 2 Combo Box, Combo Box3 for secondary multi choice column Wether, Combo Box4 for Lookup column 'shared status' .

Set Items property of Combo Box3:

Choices(tSheets2.Wether)

Set Items property of Combo Box3:

Distinct(
    ForAll(
        Ungroup(
            Filter(
                tSheets2,
                CountRows(
                    Filter(
                        ForAll(
                            Wether.Value,
                            If(
                                Value in ComboBox3.SelectedItems.Value,
                                {t: 1},
                                {t: 0}
                            )
                        ),
                        t = 1
                    )
                ) <= CountRows(ComboBox3.SelectedItems.Value)
            ),
            "Wether"
        ).'shared status',
        'shared status'
    ),
    Value
)

mmm.png

Note: This formula will not lookup the shared status one by one correspondence, if you want this, please modify the operator "<=" to "=".

Hope it could help.

Regards,

Qi

Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi@PowerAppsDawg,

Based on the issue that you mentioned, do you want to filter 'shared status' Combo Box choices based on another Combo Box?

Could you please share a bit more about the scnenario?

In my scenario, I have a SP list as below:qqq.png

Add 2 Combo Box, Combo Box3 for secondary multi choice column Wether, Combo Box4 for Lookup column 'shared status' .

Set Items property of Combo Box3:

Choices(tSheets2.Wether)

Set Items property of Combo Box3:

Distinct(
    ForAll(
        Ungroup(
            Filter(
                tSheets2,
                CountRows(
                    Filter(
                        ForAll(
                            Wether.Value,
                            If(
                                Value in ComboBox3.SelectedItems.Value,
                                {t: 1},
                                {t: 0}
                            )
                        ),
                        t = 1
                    )
                ) <= CountRows(ComboBox3.SelectedItems.Value)
            ),
            "Wether"
        ).'shared status',
        'shared status'
    ),
    Value
)

mmm.png

Note: This formula will not lookup the shared status one by one correspondence, if you want this, please modify the operator "<=" to "=".

Hope it could help.

Regards,

Qi

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,630)