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 / Filter within Filter
Power Apps
Answered

Filter within Filter

(1) ShareShare
ReportReport
Posted on by 8

This is a tuff one.. for me

 

I have a collection that one column is nested table:

 

Mattzinq_0-1695394135307.png

 

click in the table:

 

Mattzinq_1-1695394497125.png

 

the goal here is filter records of table 1, where text of inputbox is in table  1 or 2:

 

Mattzinq_2-1695394961855.png

 

the code above brings no result.. any advice?

 

 

I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,976 Moderator on at

    Hello,

     

    To clarify one point please. 

     

    You said: he goal here is filter records of table 1, where text of inputbox is in table  1 or 2:

     

    I believe you mean in the Collection (aka Table 1) and where the Collection( AKA Table1, has Column Atividade aka Table 2) has that text(somewhere), not that you are going across actual 2 tables. 

    Is that correct?

     

    Would you be able to Share the format of the sub-collection Atividade please.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Mattzinq Profile Picture
    8 on at

    Hey Mike, thanks for replying

     

    Here's the code of colProcessosConsolidado collection

     

    Clear(colProcessosConsolidados);;
    ForAll(
     Processos As Main;
     Collect(
     colProcessosConsolidados;
     {
     ID: Main.ID;
     Atividade: ShowColumns(
     Filter(
     Guia;
     Main.ID = 'ID Processo';
     'Atividade do Processo'
     );
     "AtividadedoProcesso"
     );
     TituloDoProcesso: Main.'Titulo Processo';
     Categoria: Main.'Categoria do Processo';
     Descricao: Main.'Descrição do Processo';
     Favoritado: LookUp(
     Favoritos;
     Main.ID = 'ID Processo' && User().Email in 'Criado por'.Email
     ).'ID Processo'
     }
     )
    )

     My need is find any text value in those columns and bring the records that text value is in it.

     

    The trick is that Atividade column.. for example, ID 2 has a collection nested in column Atividade, that have lots of rows of texts. If the text value is in any of that rows of collection atividade in row of ID 2, the row ID 2 of table1 must be filtered.

     

    did you get it now?

  • Verified answer
    Michael E. Gernaey Profile Picture
    53,976 Moderator on at

    Hi

     

    As long as your SubTable only has one property do it like this

    where myStuff is your Collection and where I said ThisRecord.SubTable, you put ThisRecord.Atividade and change it from SUBID to AtividadedoProcesso (which I think is your subTable property name)

     

    Filter(myStuff,
     TextInput6.Text in Ungroup(ThisRecord.SubTable,"SUBID") || TextInput6.Text in ID
    )

     

     

    My Collection

    ClearCollect(myStuff, 
     { 
     ID: "132345",
     Name: "David",
     SubTable: Table({ SUBID: "123456" })
     },
     { 
     ID: "33322",
     Name: "Tiffany",
     SubTable: Table({ SUBID: "33333" })
     }
    )

     

    Filtered By ID

    FLMike_0-1695660600913.png

    Filtered by SUBID

    FLMike_1-1695660625649.png

     

     


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Mattzinq Profile Picture
    8 on at

    Thanks for response.

     

    In fact, the function ungroup within filter is the key to filter subtables in a collection.

     

    I accepted the answer as solution but didnot worked for me.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard