Page 1 of 1

nuIsSaved() - functionality changed

Posted: Sat Jul 28, 2018 10:07 pm
by toms
Hi,

nuIsSaved() no longer works as expected due to a recent change.

I have this code in my forms (After saving, return to the previous breadcrumb)

Code: Select all

if (nuFormType() == 'edit') {
   if (nuIsSaved()) {		
      // return to the previous breadcrumb	
   }
}
(also see https://forums.nubuilder.cloud/viewtopic. ... ved#p16144)
example.JPG


Originally the function nuIsSaved() would only return true if "the current Edit Form has just been Saved." (description form the wiki)

Now nuIsSaved() also returns true when a new record is opened or an existing one is edited.

Re: nuIsSaved() - functionality changed

Posted: Sat Jul 28, 2018 11:05 pm
by alf1976
That's probably my fault Toms.

my question about telling whether is form has been edited caused Steven to alter it
https://forums.nubuilder.cloud/viewtopic.php?f=19&t=9629

Steven if you want to put it back to previous. Tom's workaround worked fine

Re: nuIsSaved() - functionality changed

Posted: Tue Jul 31, 2018 6:15 am
by admin
Andrew,

Now nuIsSaved() will return false if edited but not saved.

Steven

Re: nuIsSaved() - functionality changed

Posted: Fri Aug 03, 2018 4:48 pm
by toms
toms wrote:Hi,

nuIsSaved() no longer works as expected due to a recent change.

I have this code in my forms (After saving, return to the previous breadcrumb)

Code: Select all

if (nuFormType() == 'edit') {
   if (nuIsSaved()) {		
      // return to the previous breadcrumb	
   }
}
(also see https://forums.nubuilder.cloud/viewtopic. ... ved#p16144)
example.JPG
Originally the function nuIsSaved() would only return true if "the current Edit Form has just been Saved." (description form the wiki)

Now nuIsSaved() also returns true when a new record is opened or an existing one is edited.
Since nuIsSaved() doesn't anymore detect if a form has just been saved, would it be possible to create a new function (e.g. nuHasBeenSaved, or nuHasJustBeenSaved) ?

Re: nuIsSaved() - functionality changed

Posted: Tue Aug 07, 2018 5:10 am
by toms
Also: nuIsSaved() now returns true for new (unsaved) records - Is that really how it's supposed to be?

Re: nuIsSaved() - functionality changed

Posted: Fri Aug 10, 2018 11:26 pm
by admin
toms,

I have added a new Javascript function...

https://wiki.nubuilder.cloud/ ... sBeenSaved

I have also updated the description of nuIsSaved().

Steven

Re: nuIsSaved() - functionality changed

Posted: Sat Aug 11, 2018 6:10 am
by toms
Steven,

Perfect! Thank you so much.

Re: nuIsSaved() - functionality changed

Posted: Sat Aug 11, 2018 7:43 am
by admin
.