cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CharlieBiscuit
Regular Visitor

A field (single dropdown), which is a filtered lookup of a title (from list B), based on the presence of a specific item in the multi select choice in another field of list B

This is simplified to focus on the specific challenge….

——————————————————

In SharePoint two lists:

  • list-company: List B
    • Company name (Single line of text)
    • Relationship (Multi-select choice) - Nothing | Supplier | Vendor

list-budget-ref.png

 

  • list-budget-req: List A
    • Item (Single line of text)
    • Supplier (single select lookup) from list-company > Company name
    • Vendor (single select lookup) from list-company > Company name

 

list-company.png


——————————————————

The Power App lists the budget items and supports adding or editing them.

In Power Apps,in the 'add/edit' Screen, you can:

  • Add/edit items
    • data from list-budget

  • Select the Supplier
    • the dropdown list should come from list-company > Company name (which is referred to as Title), where the company’s 'Relationship' includes a selected option combination that includes 'Supplier'

  • Select the Vendor
    • the dropdown list should come from list-company > Company name (which is referred to as Title), where the company’s 'Relationship' includes a selected option combination that includes 'Vendor'

 

choice-filter-not-correct.png

 

For example if the following four companies were in the list-company:

CharlieBiscuit_0-1610955187662.png

Then in the Power App, when adding a new budget item:

 

The 'Supplier' dropdown list would be:

- CAUDIT

- CCNA

- Cirrus WA

 

The 'Vendor' dropdown list would be:

- CAUDIT

- Cirrus WA

- Cisco

 

——————————————————

Failed attempts:

  • Filter(Choices('list-company'.Relationship).Value,ThisRecord.Value = "Supplier")
  • Filter(Choices('list-company'.Title),Choices('list-company'.Relationship).Value,ThisRecord.Value = "Supplier"))

 

Please can someone enlighten me as to how to get the company (filtered appropriateley) to use for the Supplier and Filter lists in my PowerApp?

 

Thanks loads!

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @CharlieBiscuit 

 

Can you try to use the below expressions:

 

Filter('list-company', "Supplier" in Relationship.Value).'CompanyName'

 

Filter('list-company', "Vendor" in Relationship.Value).'CompanyName'

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 

 

Thanks loads for your response.

 

I was unable to get the list to load with:

Filter('list-company', "Supplier" in Relationship.Value).'CompanyName'

 

But, when I set it to:

Filter('list-company', "Supplier" in Relationship.Value).Title

the list is correct and loading, awesome!

 

However, when I submit the form, the data is no longer updating the usual list (list-budget-req). Is there something else that I need to change? I think becuase the form is using a dynamically generated drop down and the field to populate in SharePoint is a lookup, it's not going to work.

 

Perhaps I could have a screen of the fields that exist when I create the app from the list and hid them. Then use the dynamically generated drop down to select (via on change) the corresponding value in the hidden field?

@CharlieBiscuit 

 

In case you are using Edit Forms, then you have to check the update property of the data card. It should have a value matching the schema. 

 

You can update the expressions as:

LookUp(Choices('list-company'.Supplier),Id = DropdownName.Selected.ID)

LookUp(Choices('list-company'.Vendor),Id = DropdownName.Selected.ID)

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 

 

I've tried changing the update expression and it either switches back to the previous name or doesn't update the SharePoint list.

Could I share access to to you for the teams channel and app, so that you can see?

Ping me the email address to use?

 

This is what the items look like:

 

CharlieBiscuit_0-1611165840288.png

CharlieBiscuit_2-1611165945570.png

 

 

 

Thanks

Matt

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (56,652)