Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filter combobox in DataCard

(0) ShareShare
ReportReport
Posted on 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
    mrPax 16 on at
    Re: Filter combobox in DataCard

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

  • 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
    mrPax 16 on at
    Re: Filter combobox in DataCard

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

     

    mrPax_0-1713452869503.png

     

  • 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
    mrPax 16 on at
    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!

  • 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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard