cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdevaldoJeronim
Resolver I
Resolver I

How convert SQL to PowerApps using filter Not In

Hi everyone;

I have a SQL code and i am trying to convert into a PowerApps in my canvas App see example below but my code in PowerApps doenst work mainly "Not In" in the filter

SQL code:

SELECT TblMenuAplic.*, TblMenuAplic.IdAplic
From TblMenuAplic
WHERE (((TblMenuAplic.IdAplic) Not In (SELECT TblGrupoAplic.IdAplic
FROM TblMenuAplic INNER JOIN TblGrupoAplic ON TblMenuAplic.IdAplic= TblGrupoAplic.IdAplic
WHERE (((TblGrupoAplic.IdGrupo)=1));)))

 

My PowerApps code:

Clear(MyTblTemp);;
ForAll(

          TblMenuAplic;
          Collect(

                     MyTblTemp;
                     Filter(
                              TblGrupoAplic;
                              IdAplic Not In TblMenuAplic[@IdAplic];IdGrupo = 1
                     )
           )

)

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@EdevaldoJeronim 
Here's my suggestion.

Clear(MyTblTemp);;
ForAll(
    TblMenuAplic;
    Collect(
        MyTblTemp;
        Filter(
            TblGrupoAplic;
            !(IdAplic In TblMenuAplic[@IdAplic];IdGrupo = 1)
        )
    )
)




---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@EdevaldoJeronim 
Here's my suggestion.

Clear(MyTblTemp);;
ForAll(
    TblMenuAplic;
    Collect(
        MyTblTemp;
        Filter(
            TblGrupoAplic;
            !(IdAplic In TblMenuAplic[@IdAplic];IdGrupo = 1)
        )
    )
)




---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Jeff_Thorpe
Super User
Super User

Removing my post because I noticed after I posted that @mdevaney had already responded with the same solution. I was too slow typing.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (64,162)