Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuIsSaved() - functionality changed

Questions related to using nuBuilder Forte.
Locked
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

nuIsSaved() - functionality changed

Unread post 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.
You do not have the required permissions to view the files attached to this post.
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: nuIsSaved() - functionality changed

Unread post 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
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuIsSaved() - functionality changed

Unread post by admin »

Andrew,

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

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuIsSaved() - functionality changed

Unread post 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) ?
Last edited by Anonymous on Fri Aug 10, 2018 7:43 am, edited 1 time in total.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuIsSaved() - functionality changed

Unread post by toms »

Also: nuIsSaved() now returns true for new (unsaved) records - Is that really how it's supposed to be?
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuIsSaved() - functionality changed

Unread post by admin »

toms,

I have added a new Javascript function...

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

I have also updated the description of nuIsSaved().

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: nuIsSaved() - functionality changed

Unread post by toms »

Steven,

Perfect! Thank you so much.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuIsSaved() - functionality changed

Unread post by admin »

.
Locked