0
votes

I have a PowerApp that submits items to a SharePoint list (Let's call it ListA), I have a dropdown in the app ('FieldA1Dropdown') where the available selections need to come the 'MyItemNames' column from another SharePoint list (ListB), but I only want to see the items from ListB whose values in two other columns in match my conditions. Specifically I only want to show the MyItemNames from ListB that are both active and transferrable.

I'm having a heck of a time sorting it out.

So the FieldA1Dropdown.Items property needs to be something like:

Filter(ListB.MyItemNames, ListB.Active.Value="Y", ListB.Transferrable.Value="Y")

But of course, this doesn't work.

I've already tried pulling in ListB's MyItems column by configuring FieldA1 as a Lookup field in Sharepoint, but you can't filter items based on other columns like I need to here.

Sidenote: Both ListA and ListB are already set up as data sources in this PowerApp.

Please advise.

2

2 Answers

0
votes

Try as following to show MyItemNames from listB only when Active = "Y" and Transferrable="Y":

Distinct(Filter(ListB, Active = "Y" && Transferrable="Y"),MyItemNames)
0
votes

I was able to solve my issue using the following setup.

Using the example names from my initial question: In SharePoint, start with going the 'traditional' route and configure your FieldA1 as a lookup field connected to ListB's 'MyItemNames' column.

Then set your Field1ADropdown.Items Property to the following: Filter(Choices([@'ListA'].'FieldA1'),LookUp(ListB,MyItemNames=Value,Active)="Y",LookUp(ListB,MyItemNames=Value,Transferrable)="Y")

You'll get a delegation warning, but as long as ListB is under 500 items you'll be fine.