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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to add a static bl...
Power Apps
Answered

how to add a static blank gallery item to a gallery?

(0) ShareShare
ReportReport
Posted on by 496

Hello everyone,

 

I hope all is well,

 

My Concern:

I have a gallery that displays data from a table in dataverse.

I want to add a blank static item to this gallery, where I'm going to add static text in it.

 

What I have:

Roberto_el_Hajj_0-1668782204476.png

 

I want to add an additional item to this gallery that does not exist in the filtered table so I can make a pop-up visible whenever it's pressed. 

To make things easier, please find below a representation of the additional item that I need to add:

Roberto_el_Hajj_1-1668782376650.png

 

 

Thus, how this can be done?

 

Any help would be highly appreciated,

 

Thank you

 

 

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Roberto_el_Hajj ,

     

    My solution was to store the filtered list in a collection with "ClearCollect()", then add a blank record with a follow-up "Collect()".

     

    ClearCollect(
     collection,
     Filter(source,...)
    );
    Collect(
     collection,
     Defaults(source)
    )

     

    The collection will contain all the items from the "Filter()", plus an additional blank record. 

     

    Then I added some conditions to the controls inside the gallery to behave differently if the record was blank or not.

     

    Hope this was helpful to you.

  • RobHajj98 Profile Picture
    496 on at

    Hello @WiZey, I retested the expression you mentioned above, but it didn't seem to work.

    Does it have anything to do with the required fields, or with the lookup even if it makes no sense?

     

  • WiZey Profile Picture
    3,023 Moderator on at

    No, it shouldn't be related to any required fields. For example, "Defaults()" return a blank item using the rules from the SharePoint list. If you mentioned a default value in a column it should put the default value in the item.

     

    Could you elaborate on which part in didn't work? What errors are you getting?

     

    Let's try step by step.

     

    The formulas I provided should have created a collection from the "Filter()" plus a blank record. Can you confirm the collection works first with the "Filter()" alone, then with "Defaults()" alone, and then both to see if the collection is populated with all the items?

  • RobHajj98 Profile Picture
    496 on at

    Hi @WiZey , that what i thought too.

     

    In my gallery's Items property, I add the below expression:

    Filter(
     'Employee Leave Balances Col',
     'Employee Number'.No = EmpID,Status = 'Status (Employee Leave Balances)'.Active
     
     )

     

    On a separate button (let's call it button 1), I added the below expression to create the collection:

     ClearCollect(
     'Employee Leave Balances Col',
     'Employee Leave Balances'
    )
    
    

     

    And it works fine, the collection has been created and the records are being displayed as expected.

  • SebS Profile Picture
    4,616 Moderator on at

    What if create a gallery with Sequance() in its place in Sequence number of Tiles you are looking for and then nest the other gallery in it that means you have a full control and avoid any delegation issues when you use collection keep in mind it can hold only 2000 records.

     

    just an idea 

  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    @SebS I'm afraid you answered to the wrong topic?

     

    @Roberto_el_Hajj Have you tried adding the code below in your "OnSelect" of your button:

     

    ClearCollect(
     'Employee Leave Balances Col',
     'Employee Leave Balances'
    );
    Collect(
     'Employee Leave Balances Col',
     Defaults('Employee Leave Balances')
    )

     

    Also, I see some conditions in the "Filter()" you provide to your gallery. I'm guessing this is what is "masking" the blank record because it is filtered out.

     

    Can you try adding another condition to try and keep the blank record? Perhaps something like this:

     

    Filter(
     'Employee Leave Balances Col',
     'Employee Number'.No = EmpID,Status = 'Status (Employee Leave Balances)'.Active,
     IsBlank('Employee Number'.No) //Blank record should have blank number, right?
    )

     

  • SebS Profile Picture
    4,616 Moderator on at

    How I manage to do that I'm confuse 🙂 **bleep** My Apologies

  • Verified answer
    RobHajj98 Profile Picture
    496 on at

     @WiZey, I missed that one 😂

    My filter condition caused the problem, so the solution is to patch the "EmpID" and the "Active" status to the blank record to fix this.

     

  • WiZey Profile Picture
    3,023 Moderator on at

    I'm glad the problem was spotted quickly!

     

    Let me know if it works fine, or if you need help on something else.

  • RobHajj98 Profile Picture
    496 on at

    I really appreciate your fast response and help @WiZey.

    Thank 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard