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 / Gallery Not Refreshing
Power Apps
Suggested Answer

Gallery Not Refreshing

(1) ShareShare
ReportReport
Posted on by 13
I have been beating my head against the wall trying to figure out, what I thought was a very simple problem that could be fixed but it's proving to be everything but.  The root of my struggle mainly lies with someone else designing this particular app and I'm trying to figure out their logic.  Probably 6 months ago, all of our apps stopped functioning and it was determined by the app designer that the date format needed changed.  Well, that fixed the app functioning issue, but then it caused another issue.  The completed tasks don't drop off of the gallery after completed.  The backend report shows the status as 'Complete' but the date column shows up as # symbols.  I have to actually manually go into each record on the backend (datasource) and place the completion dates for them to refresh in the app.  Although it's a reasonable work around, it's proving to be frustrating for end-users because they can't see their tasks drop off after they complete them.  There is one app to schedule the task and another app to complete it.  I've tried so many different codes that don't thrown up any errors but still don't fix the refresh issue.  Anyone else experience this issue?  Any help would be greatly appreciated.  I've not had any formal training in Powerapps, so I've just had to learn as a I go, unfortunately.  
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    What is your data source type and (in Text please) the Items of the Gallery. Also how are you (code in Text please) updating the completion date ?
    Also this seems to be a duplicate of this thread - please choose one to continue with.
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    Can you provide some more details on your app.
    What is your data source?
    What is the date format?
    What do you mean by dropping off completed tasks?
    Are you using Patch to update the data?
    You indicate that your apps stopped working one day. Did you ever identify the underlying issue because changing the date format would generally not fix an issue with a working app.
    What operation does the refresh perform such as update/create records or modify column values?
  • LF-13021902-0 Profile Picture
    13 on at
    @ronaldwalcott The data source is an Excel table and the date format is yyyy/mm/dd/time and it's formatted as a date field in Excel.  When I say dropping off, I mean when they complete a task, it should disappear from the gallery and it just stays there, even though the Excel table shows it's completed.  I am not using a patch and I was not involved in the initial fix but I am certain the root cause of the issue wasn't determined.  
  • Inogic Profile Picture
    1,265 Moderator on at
    Hi,
     
    1) Fix the "#" Symbols in Date Column                            
       The '#' symbol occurs when a text label tries to display a data type it cannot interpret as a date, often caused by changing the format in PowerApps  without accounting for the underlying data structure,
       or when a blank/null date is passed.               

    Use the Text() function to explicitly format the date in your label's Text property.
          Replace 'YourDateColumn' with the actual name
          Text(ThisItem.YourDateColumn, "dd/mm/yyyy")
    If the issue is with DatePicker controls, ensure they are not conflicting with date format settings in the app, and try using the DateValue() function to cast it properly.

    2) Fix the Gallery not refreshing issue
        A. Force Gallery Refresh on Task Completion
             Power Apps galleries sometimes use a local cache. If the "Completion App" is separate from the "App used for scheduling task", the Gallery might not know  a change happened. Add a Refresh()
             command immediately after the completion logic:
                       Patch(DataSource, ThisItem, {Status: "Complete", CompletionDate: Today()});
                       Refresh(DataSource);
       B. Clear and Re-collect Data (If using collections)
            If your gallery is based on a collection, use ClearCollect to update it.
                      Patch(DataSource, ThisItem, {Status: "Complete"});
                      ClearCollect(colTasks, Filter(DataSource, Status <> "Complete"))

    3) Verify the Gallery Filter Logic
          Avoid filtering by the Date column until # symbols is fixed in the backend, as corrupted dates return Blank or Error, which keeps them visible in your filter.

    4) Fixing the Delayed Drop-off (Manual Edit Required)
       Tasks only drop off after manual editing because the app doesn't know it needs to re-filter the data until the data source is forced to reload.
       Place a Refresh(DataSourceName) on the OnVisible property of the screen holding the gallery. This ensures that every time the user navigates to that          screen, the data is updated.

    Hope this helps.
     
    Thanks!
    Inogic
  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    I suspected Excel - really the "data source of last resort" and does not handle dates well or as you would expect. Firstly, if you have access to SharePoint Lists, I encourage you to move the data there and the issues should go away.
     
    If you cannot do this, are you storing the dates in Excel as Text or Date format ? The easiest way is Text, then use DateValue to read them and then Text to write them back. Otherwise Power Apps sees a number, which is far more complex to convert.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
     
  • LF-13021902-0 Profile Picture
    13 on at
    @WarrenBelz Thank you....what would be an example of a good code to use for that?   There are so many different variations and I have tried similar suggestions that aren't working.  
     
     
  • Suggested answer
    wolenberg_ Profile Picture
    1,476 Super User 2026 Season 1 on at
    Hi @LF-13021902-0 , here it some idea that you can try to implement and solve your issue.
     
    1. Check the column type

      Make sure the completion date column in SharePoint is a proper Date/Time field, not text.
    2. Update logic in the “Complete task” app

      When marking a task complete, explicitly patch a valid date value:
      Patch(
          Tasks,
          ThisItem,
          {
              Status: "Complete",
              CompletionDate: Now()
          }
      )
      
      That ensures the backend has a real date, not a placeholder. 
    3. Adjust gallery filter

      Instead of relying on the date column alone, filter by status:
      Filter(Tasks, Status <> "Complete")  ​​​​​
      
      This way, even if the date is missing, completed tasks won’t show.
      
    4. Refresh the datasource

      After patching, call Refresh(Tasks) so the gallery picks up the updated records.

    The gallery isn’t refreshing because the completion date isn’t being stored as a valid date. Fix the patch logic to write Now() into the date field, and adjust the gallery filter to hide completed tasks based on the status column.



     
  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    I assuming I am dealing with your original posted problem of dates in Excel- I will post this on both threads so hopefully they can be closed. As I mentioned, dates in Excel are actually stored as numbers  - there is some conversion capability, however the easiest way to handle this is to format the Excel column as Text. You did not say where you were based, so may have to change the language below and also your date structure (if you are in the USA, where the dates are backwards or the rest of the world that uses the logical dd/mm/yyyy).
     
    So two things - once you have your dates in the correct format in Excel, the DefaultDate of your (example Classic) Date Picker would be  (using your language - "en-US" for USA)
    DateValue(
       ThisItem.YourDateTextField,
       "en-GB"
    )
    This converts the text to a Date in the Date Picker. Then the Update of your data card
    Text(DatePickerName.SelectedDate, DateTimeFormat.ShortDate,"en-GB")
    This will put it back into Text in Excel.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   
  • LF-13021902-0 Profile Picture
    13 on at
    @WarrenBelz Unfortunately, it's not working.  I finally got the backend report to reflect the correct date but then it still will not drop off the gallery when a task is completed.  There is a clear-collect command, so the typical 'refresh' code won't work.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard