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 / Conditionally add reco...
Power Apps
Answered

Conditionally add record to table?

(0) ShareShare
ReportReport
Posted on by 664

I am using a Table for the Items property of a gallery:

 

Table(
 {
 Date: Today(),
 Status: "Pending"
 },
 {
 Date: Today(),
 Status: "Pending"
 }
)

 

This works as expected, but I am trying to conditionally show/hide items to be displayed in the gallery. I noticed that if I add a condition around one of items in the table, it still adds the item but it's blank.

 

Is there any way to completely ignore adding the item to the table? I want there to truly only be one record shown in the gallery that displays this table. This example below will show two items, one with fields shown (first) and one without.

 

Table(
 {
 Date: Today(),
 Status: "Pending"
 },
 If(
 true = false,
 {
 Date: Today(),
 Status: "Pending"
 }
 )
)

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Cooper01 

    Filter! 

    Please consider changing your Formula to the following:

    Filter(
     Table(
     {
     Date: Today(),
     Status: "Pending"
     },
     {
     Date: Today(),
     Status: "Active"
     }
     ),
     Status <> "Active"
    )

     

    I am not sure of what you are really trying to do as your example has two records that are identical.  But, the basic concept is to filter your table to get what you want.

     

    I hope this is helpful for you. 

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard