Skip to main content
Community site session details

Community site session details

Session Id : NBdj1oy+0KuidTC4RGQ25h
Power Apps - Building Power Apps
Unanswered

Gallery displaying duplicate tile for same item in PowerApps

Like (0) ShareShare
ReportReport
Posted on 4 Nov 2020 13:06:43 by 227

Hi,

My DataSource is Excel table. Below is snipped of my Initial table. I have 4 screen as mention belowInitial.PNG

 

Screen 1: Gallery with different System tiles and system status,which navigates to Screen 2. I use template fill to show current system status (Available=Green,In Use=Yellow,OOS=Red)

Screen 2: Systems Summary is displayed with 3 buttons on Screen. Signup,Update Status,Cancel

Screen 3: Signup Screen (Navigation from Screen 2)

Screen 4: Update Status Screen (Navigation from Screen 2)

 

The Signup Screen is setup in such a manner that when user clicks submit button, the code will search if there is data for system.If the data is missing for the system, that row for system will be updates. In below snipped, we can see that User1 signup for "Sys1" and it's current status was set to "In Use". Once User1 is done with using Sys1, he will navigate to Update Status screen and will update instrument status to "Available".

First signup.PNG

The issue occurs when User 2 signup for Sys1. Though the row will be appended for "Sys1" in Excel Table. I am getting an extra tile for Sys1 in Screen 1. Below is the snippet of updated excel table after User 2 signup. Below is the code for Template fill,Gallery.Items property of Screen 1.

2nd Signup.PNG

Gallery-> Items Property code of Screen 1

GroupBy(Filter(Table1,Startswith('System Name',"Sys"),"System_x0200_Name","ByName"))

 

Template Fill code of Screen 1

If(And(ThisItem.'Previous Status'="Available",Not(ThisItem.'Current Status'="In Use")),RGBA(54,176,75,100),ThisItem.Previous Status="Out Of Service",RGBA(255,0,0,100),RGBA(255,191,0,100))

 

Above code is producing Gallery with empty tiles shown below:

Capture.PNG

Note: If I use Filter code, I can see duplicate tile for same system. However, when I use GroupBy code wrapped around filter code, I am getting above screen in Screen 1

 

Please provide explanation with code.

  • Newbie12 Profile Picture
    227 on 05 Nov 2020 at 12:14:22
    Re: Gallery displaying duplicate tile for same item in PowerApps

    Hi @VijayTailor,

     

    Can you please elaborate more on "Now you can Crosscheck on what basis you filtering for your requirement",possibly with code ?

    I was thinking of creating an IF statement where my Syntax will be IF(check for duplicate in Table) then filter based on last Instrument Current Status and display only one instrument for the duplicate, else display the instrument.I am not sure how to achieve this in Gallery Items property ? 

    Is there any another approach I can try to display single tile for duplicate instrument ?

     

    Thanks in advance!

  • Vijay Tailor Profile Picture
    2,961 on 04 Nov 2020 at 18:42:44
    Re: Gallery displaying duplicate tile for same item in PowerApps

    Hi @Newbie12 ,

    Below is the Code is Creating New Record.

    Now you can Crosscheck on what basis you filtering for your requirement.

    Patch(Table1,Defaults(Table1),{'System Name':DataCardValue1.Text,'Model'=DataCardValue2.Text,'Current Status':"In Use"});Navigate(Screen1);ResetForm(Form1)

    Another solution is - 
    you can replace the below if the part with the below Code. (Hope your Issue is resolved)

    If(CountRows(Filter(Table1,Lower("System Name")=Lower(DataCardValue1.Text))))>0;

      Thanks,
    Vijay

    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."-Vijay

  • Newbie12 Profile Picture
    227 on 04 Nov 2020 at 15:44:55
    Re: Gallery displaying duplicate tile for same item in PowerApps

    @VijayTailor,

     

    Please see below Patch Code

     

    If(CountRows(Filter(Table1,"System Name"=DataCardValue1.Text)))>0;

    Patch(Table1,Lookup(Table1,"System Name"=DataCardValue1.Text)),{'System Name':DataCardValue1.Text,'Model'=DataCardValue2.Text,'Current Status':"In Use"}),

    Patch(Table1,Defaults(Table1),{'System Name':DataCardValue1.Text,'Model'=DataCardValue2.Text,'Current Status':"In Use"});Navigate(Screen1);ResetForm(Form1)

     

    Thanks in advance,

  • Vijay Tailor Profile Picture
    2,961 on 04 Nov 2020 at 15:23:26
    Re: Gallery displaying duplicate tile for same item in PowerApps

    Hi @Newbie12 ,

    Can you please mentione the code here for this part mentioned by you?

    The issue occurs when User 2 signup for Sys1. Though the row will be appended for "Sys1" in Excel Table. I am getting an extra tile for Sys1 in Screen 1. Below is the snippet of updated excel table after User 2 signup. Below is the code for Template fill,Gallery.Items property of Screen 1.

    As per my Understanding, this part your patch Code has Some Issue. (Details mentioned above).

    Basically in this Part, you need to Write Patch code for Update not for Create.

    Please cross-check the code or update here so, I can suggest if I got someting .

    Thanks,
    Vijay

    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."-Vijay




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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading started
Loading complete