1

I need to filter a column in the list A, in her form. The filtered values must exist in the list B and I need do this in the form of powerapps. It's simple to do this in SharePoint 2013, but I cant do this in powerapps.

I'm trying do this:

Filter(Choices([@ListA].Diretoria);Value in Filter(ListB;ReferenceFilter.Empresa=DataCardValue3.SelectedItems).Title)

but I cant read the ListB.

List B

enter image description here

Ex: When I select the Empresa 1 in the field DataCardValue3 in the form of the list A, I need filter to show just values of Diretoria A and C.

Someone can help me?

3
  • What's the relation between the List A and List B? Dec 21, 2020 at 23:20
  • Can you explain a bit more about the configuration of the lists and also fields you use in the formula? Are these column names you use in the two lists - Diretoria, Empresa, ReferenceFilter? Dec 22, 2020 at 7:46
  • The list B have the column Empresa and the DataCardValue3have the same values, I need select 1 of all values in list B have the same Empresa record. Dec 22, 2020 at 11:10

2 Answers 2

2

Try the following formula:

DataCardValue3.Items = Filter(Choices([@ListA].Diretoria),Value in Filter(ListB,DataCardValue2.Selected.Value=Empresa).Title)

DataCardValue2 is the data card for the Choice column Empresa.

DataCardValue3 is the data card for the Lookup column Diretoria

enter image description here

5
  • When I use [@ListA] I have a error, it seems that the name is not associated with the list, the only list that is found is the current list where I am modifying the form. Dec 22, 2020 at 11:19
  • I have successful to add the data source of list B, but the filter not working :( Dec 22, 2020 at 13:03
  • Filter(Choices([@Divisao].Diretoria);Value in Filter(Diretoria;DataCardValue9.Selected.Value=Empresa.Value).Title) the code run, bu the itens not filtered, all is showed Dec 22, 2020 at 13:29
  • I have sucesseful doing this Filter(Choices([@Divisao].Diretoria);Id in Filter(Diretoria;Empresa.Id=DataCardValue9.Selected.Id).ID) Dec 22, 2020 at 14:08
  • 1
    @DiegoHillesheim Glad to know you solved your problem. You can mark your own Answer so that it will help others in this forum as well. Thanks. Dec 23, 2020 at 1:28
0

i have successfull doing this:

1 - Add list b as datasource 2 - Do the filteer by ID

Filter(Choices([@Divisao].Diretoria);Id in Filter(Diretoria;Empresa.Id=DataCardValue9.Selected.Id).ID) (in pt-br we use ';' and not ',')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.