Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Form (Preview) bug - date picker holds onto old data when form in View mode

(1) ShareShare
ReportReport
Posted on by 4
Discovered a problem with the Form (Preview) control (specifically the date picker) in PowerApps (Canvas).

Issue: Within the Form (Preview) the date picker control holds onto previous record data if selecting a new record whose date field is empty. It should instead display no date. Only occurs when form is in VIEW mode, not EDIT mode. In EDIT mode the date picker will correctly display no date if the date is empty.
 
Steps to reproduce:
 
1.  Create PowerApp (Canvas) with a gallery connected to a dataverse table, and a Form (Preview) which is also connected to that table and uses the gallery to select current item.
     Table should have records including a date record, some with dates selected, some empty.
     Obviously the Form (Preview) will have a date picker.
 
2. Run the app.
 
3. Ensure Form (Preview) is in VIEW mode. Does not occur in EDIT mode.
    In the gallery, select an item whose date field holds data (date is not blank). Form's date picker will display that item.  Eg.  "Mon, Aug 12, 2024".
 
4. In the gallery, select a record whose date field is empty.  Form's date picker will not refresh and continue to display previous "Mon, Aug 12, 2024" data (holding onto old data). It should instead be blank as per the current item.
 
  • Suggested answer
    Ravindra Jadhav Profile Picture
    Ravindra Jadhav 240 on at
    Form (Preview) bug - date picker holds onto old data when form in View mode
    It is preview feature try to avoid using it. I also face same issue while working with new form preview
     
     
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • CU23070549-0 Profile Picture
    CU23070549-0 4 on at
    Form (Preview) bug - date picker holds onto old data when form in View mode
    (In response to FLMike -

     "You can always add a reset(datapicket) in your Gallery OnSelect."

    Thanks for the suggestion. I've tried this and while datePicker is not a resettable control, we can reset the entire form, but even that does not work. The datePicker holds the last date it has and keeps displaying it until another date is provided. Note this only happens in 'View' mode. If the form is in Edit Mode then it always refreshes with the latest data.

    Best temporary workaround is to make the control not visible when its blank. This works.
    Code for date picker's visible field:
    If(IsBlankOrError(ThisItem.'Date of Incident'), false,true)

    The setup is very simple for testing this bug.
     
    Forms Item property
    galleryRecords.Selected
     
    Forms Data source
    IntegrityManagerReports   // (a dataverse table)
     
    Gallery's Items property
    IntegrityManagerReports   // same dataverse table
     
    Date Control's Default Date
    The date picker has no 'default' field available, but its "SelectedDate" is set to:
    Parent.Default

    And the parent (Card) has its Default set to
    ThisItem.'Date of Incident'    (a date column in the dataverse table)
     
    Can we raise this bug with the developers? Perhaps I should log a ticket via the PowerPlatform portal.
    ---------------

    Here's a screenshot showing PowerApps knows the  date is Blank, yet the control is still showing the previous date. Clearly a bug with the control itself.
     
  • Suggested answer
    FLMike Profile Picture
    FLMike 27,710 on at
    Form (Preview) bug - date picker holds onto old data when form in View mode
    Hi,
     
    Please share your Forms Item property and that specific controls Default Date
     
    You can always add a reset(datapicket) in your Gallery OnSelect.
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard