cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Unsaved Property of Edit Form Is Always True

The Unsaved property of my Edit Form form always has a value of true, even when I have made no changes. My form is in FormMode.Edit.

 

As a test I created a button with this code in the OnSelect property.  The Edit Form still shows Unsaved as true after I click the button

 

ResetForm(Form1);

 

 

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

5 REPLIES 5
Highlighted
Super User
Super User

Re: Unsaved Property of Edit Form Is Always True

@mdevaney ,

That is interesting and I have had issues with the same test, however I just did a quick on on sample data - the Visible on the label is FormName.Unsaved. Maybe it is the Reset - I would love to hear from others as well.

UnsavedForm.gif

 

Highlighted
Microsoft
Microsoft

Re: Unsaved Property of Edit Form Is Always True

Hi @mdevaney :

Do you means the value of your Edit Form's Unsaved property always be true?

Through testing, I found a possible cause of this problem:

The value of the Update property of the data card is different from the original record (unlocked and modified the properties).

Test 1:Use automatically generated edit form (without changing properties)

As demonstrated by @WarrenBelz , everything works fine.

Test1.JPG

Test 2:Change the Default property of a control(use 2 instead of ThisItem.upticks)

My Edit Form's Unsaved property always be true.(Even resetting the form doesn't work)

Test2.JPG

Test 3:Change the Default property of a control(use 1 instead of ThisItem.upticks)

The value of Unsaved property returns  false.

Test3.JPG

I think Unsaved property's principle is to verify the value in the UpDate property of all data cards in the form. If it is equal to the value in the original record, it will be false, if it is not equal to it will be true.

Best Regards,

Bof

 

Highlighted
Super User
Super User

Re: Unsaved Property of Edit Form Is Always True

@v-bofeng-msft ,

Explains the mystery - thanks - so to clarify, unlocking is not the issue, but changing the Default or Card Update is? Also will it work on cards not changed even if other are?

Highlighted
Microsoft
Microsoft

Re: Unsaved Property of Edit Form Is Always True

Hi @WarrenBelz :

Thanks for your summary.

The result of my test is:

  • Unlocking is not the issue, but changing the Default or Card Update is.
  • As long as the record of the form that will be update at the time is the same as the original record, the value of the Unsaved attribute will be false.

Best Regards,

Bof

Highlighted
Super User
Super User

Re: Unsaved Property of Edit Form Is Always True

Thanks @v-bofeng-msft ,

@mdevaney  - mystery solved - that is probably workable as a Variable can be set OnChange of the affected cards and this tested also.

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,107)