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 / Where clause equivalen...
Power Apps
Answered

Where clause equivalent in Power Apps for Filter

(0) ShareShare
ReportReport
Posted on by 124

I'm struggling with attempting to write the PA equivalent of a SQL where clause. In this Bold line below I want to flag records to be deleted in TempOptions that have the same QID as a parent record in TempQuestions that has already been marked with the delete flag. PA doesn't like using Filter with =. 

 

Is there a way to filter the multiple records in TempOptions and flag them based on the matching the QID and delete flag from another table (TempQuestions)? 

 

Patch(TempQuestions, LookUp(TempQuestions, QuestionText = ThisItem.Question),{Delete: 1}); ForAll(TempQuestions,Patch(TempOptions, First(Filter(TempOptions, QID = TempQuestions.QID && TempQuestions.Delete = 1)),{Delete: 1})); Remove(TempQuestions,Filter(TempQuestions, Delete > 0)); Remove(TempOptions,Filter(TempOptions, Delete > 0)); Patch(QuestionPool,ThisItem,{Loaded: 0});

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @krickard

    To find all of the records we need to update within TempOptions we can use this code

    Filter(TempOptions, QID in Filter(TempQuestions, Delete =1).QID)


    But to actually update them we can do this

    UpdateIf(
     TempOptions,
     QID in Filter(TempQuestions, Delete =1).QID),
     {Delete: 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."

  • krickard Profile Picture
    124 on at

    Thanks @mdevaney it works. 

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard