Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

How to refresh gallery in real time

Like (0) ShareShare
ReportReport
Posted on 2 Aug 2021 06:22:46 by 290

Hey! I am working on Time off app. I have this issue, hope someone can help.

 

If an employee asks for a vacation, it saves the info in the sharepoint list and it shows in my gallery. The thing is that the gallery is not refresing in real time, meaning I have to refresh the whole app to see the request. Could someone help?

 

The gallery:gallery.PNG

 

And the sharepoint list:

data.PNG

 

  • Verified answer
    WarrenBelz Profile Picture
    147,161 Most Valuable Professional on 02 Aug 2021 at 07:54:51
    Re: How to refresh gallery in real time

    Hi @Filistyn ,

    Firstly, the issue is not obvious presently as the gallery Items

    SortByColumns(
     Filter(
     VacationTracker; 
     DepartmentCopy = lblDepartment.Text; 
     Title <> User().Email
     ); 
     "Approval"; 
     SortOrder.Descending
    )

    are directly querying the list and should refresh. One issue here is that the <> operator is not Delegable, so you could try this

    With(
     {
     wList:
     Sort(
     VacationTracker; 
     ID;
     Descending
     )
     };
     SortByColumns(
     Filter(
     wList; 
     DepartmentCopy = lblDepartment.Text; 
     Title <> User().Email
     ); 
     "Approval"; 
     Descending
     )
    )

    The Patch code should work although I tend to be record specific

    Patch(
     VacationTracker; 
     {ID:ThisItem.ID}; 
     {Approval:"Accepted"}
    );;

    The Date should refresh as long as the gallery contains the current record details

    If(
     ThisItem.TypeOfVacation = "Vacation" ||
     ThisItem.TypeOfVacation = "Business Trip"; 
     ThisItem.StartDate & " to " & ThisItem.EndDate; 
     ThisItem.TypeOfVacation = "Overtime" || ThisItem.TypeOfVacation = "Halfday"; 
     ThisItem.StartDate
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 250 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 126

#3
stampcoin Profile Picture

stampcoin 110

Overall leaderboard
Loading complete