web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 6v5FTS3E71rxWZ+/ZQ5mJj
Power Apps - Building Power Apps
Unanswered

Filter combobox in DataCard

Like (0) ShareShare
ReportReport
Posted on 18 Apr 2024 00:34:27 by 16

Guys, I have an application where I need to filter in a form active regions that are active on SharePoint. In the main table, which I'll call Table1, I have the records generated from this form, and in another table, I search for active regions, which I'll call Table 2.

 

Now that it's working, I can filter active regions, but I've discovered a bug when there are regions with the same name. So, I want to add a rule when filtering by taking another auxiliary column called 'Diretoria.' How can I do that?"

 

Here is the code I am using today:

 

Filter(
Choices([@Table1].Regional),
LookUp(Table2 As p, p.Regional = Value).Ativo = true
)

 

 
 
 
 
  • mrPax Profile Picture
    16 on 19 Apr 2024 at 14:35:20
    Re: Filter combobox in DataCard

    @v-mengmli-msft Both columns "Regional" and "Diretoria" are the type of Lookup and get values from Table 2

  • v-mengmli-msft Profile Picture
    on 19 Apr 2024 at 01:09:39
    Re: Filter combobox in DataCard

    Hi @mrPax ,

     

    What is the type of Regional of Table1?

    Please try add ".Value" after the "Regional".

     

    Best regards,

    Rimmon

  • mrPax Profile Picture
    16 on 18 Apr 2024 at 15:08:37
    Re: Filter combobox in DataCard

    @v-mengmli-msft In the last part of code it's returning this error:

     

    mrPax_0-1713452869503.png

     

  • v-mengmli-msft Profile Picture
    on 18 Apr 2024 at 05:32:39
    Re: Filter combobox in DataCard

    Hi @mrPax ,

     

    Have you tried "AddColumns"? Maybe this is what you want.

    AddColumns(Filter(
    Choices([@Table1].Regional),
    LookUp(Table2 As p, p.Regional = Value).Ativo = true
    ),"Diretoria",LookUp(Table1,Regional=Value,Diretoria))

     

     

    Best regards,

    Rimmon

  • mrPax Profile Picture
    16 on 18 Apr 2024 at 03:26:47
    Re: Filter combobox in DataCard

    Hi @v-mengmli-msft,

     

    In Table 1 we have columns called "Regional" and "Diretoria" both columns are used in Table 2 too

    The diference is, in table 1 go the results when i create a new record in app, and the other table stays with the same value.


    In table two we can Activate the column "Regional" and i'm filtering this here to only show values "Ativo" =true in combobox:

     

    Choices([@Table1].Regional),
    LookUp(Table2 As p, p.Regional = Value).Ativo = true
    )

     

    To make this "Regional" column value different to another, we had this column called "Diretoria" where we have "South, West, North" so i want to increment this column in code too.

    There is a way to do this?

    Thanks!

  • v-mengmli-msft Profile Picture
    on 18 Apr 2024 at 01:26:41
    Re: Filter combobox in DataCard

    Hi @mrPax ,

     

    What does your Table1 look like? What does your Table2 look like?

    It will be better to show some examples of tables and results to explain what you want.

     

    Best regards,

    Rimmon

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete