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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Selected items of peop...
Power Apps
Answered

Selected items of people filter in Power Apps changes the filter result

(2) ShareShare
ReportReport
Posted on by 43

Good afternoon,

I need to make a filter of people, but I am dealing with a problem.

If I input  "Max" and "Josh" on the filter, when I use the filter searching in other order, like "Josh" and "Max", the filter don't recognize the names.

See below the images for better understanding.

WhatsApp Image 2024-07-05 at 13.28.07.jpegWhatsApp Image 2024-07-05 at 13.27.25.jpeg

The order of the names inputed, changes the filter result.

Filter(
    solucoes_tech_mainbase,
    Or(
        TextInput1_2.Text in 'Nome da Solução',
        TextInput1_2.Text in Descrição
    ) && Concat(
        ComboBox1_1.SelectedItems,
        DisplayName & ","
    ) in Concat(
        NomeCriador,
        DisplayName & ","
    ) && Concat(
        ComboBox2_1.SelectedItems,
        Value & ","
    ) in Concat(
        'Tecnologias envolvidas',
        Value & ","
    )
)

That's the code I'm using to filter, but the only part related to this specific problem, is ComboBox1_1.

 

If you want to have more informations, please feel free to ask.

Categories:
I have the same question (0)
  • KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    Hi @csouza123,

     

    The issue may be that the following code concatenates all ComboBox1_1.SelectedItems into a single string, e.g. "Max,Josh,":

    Concat(ComboBox1_1.SelectedItems, DisplayName & ",")

     

    This means that when we compare it with another string, that exact string (e.g. "Max,Josh,") must match in the other string.

     

    However, what happens if you change that code to the following to compare NomeCriador with all items in ComboBox1_1.SelectedItems?:

    NomeCriador in ComboBox1_1.SelectedItems

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Connect with me online.

  • Verified answer
    WarrenBelz Profile Picture
    156,117 Most Valuable Professional on at

    HI @csouza123 ,

    Adding to to @KeithAtherton 's comments if you are trying to do a many-to-many filter here, you need to approach this differently as per the example below as "one side" of the comparison needs to be a single value querying a Table on the other.

    With(
     {
     _Data,
     Ungroup(
     ForAll(
     ComboBox1_1.SelectedItems As _Item1,
     Filter(
     solucoes_tech_mainbase,
     (
     TextInput1_2.Text in 'Nome da Solução' ||
     TextInput1_2.Text in Descrição
     ) &&
     _Item1.DisplayName in NomeCriador.DisplayName
     )
     ),
     Value
     )
     },
     Ungroup(
     ForAll(
     ComboBox2_1.SelectedItems As _Item2,
     Filter(
     _Data,
     _Item2.Value in 'Tecnologias envolvidas'.Value
     )
     ),
     Value
     )
    )

     

  • csouza123 Profile Picture
    43 on at

    Good morning,
    Thanks for helping me on this issue @WarrenBelz and @KeithAtherton !
    Answering to Keith's question, if I use the formula that he said, the filter does not work, I've already tried it.

    About Warren's formula, I tried it but i got some errors.

    Find attached the message I received when I try the formula.

    Captura de tela 2024-07-09 073350.jpg
  • WarrenBelz Profile Picture
    156,117 Most Valuable Professional on at

    @csouza123 ,

    Please see small correction in third line.

  • csouza123 Profile Picture
    43 on at

    The code is not showing errors anymore, thanks!

    But now, I cannot see any item on the gallery

    csouza123_0-1720530662818.png

    Even if I use the filters, the gallery still not show any rows

  • csouza123 Profile Picture
    43 on at

    Doing some tests here, I noticed that the filter is actually working now, but for some reason the values of the "ThisItem" formula are not bringing the information they are supposed to.

    They are just bringing empty values for all the rows.

    csouza123_0-1720543298360.png


    As you can see here, there are 2 rows that are coming with the filters, that's exactly the quantity that I expected.

    I'm not sure why the values are not showing up, but the filter formula is working now.

    Ignore the errors on the picture, there is a pop up there.

    Do you have any idea of how can I get the values back on the gallery?

  • csouza123 Profile Picture
    43 on at

    I found the problem, the name of the columns was different for some reason, but I figured it out.

    Thanks for the help, I own you one!

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard