toms
Its commit b8e0602943fa1778cb2cf047ff96c878b1272c7d.
Steven
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
nuHasBeenSaved() Topic is solved
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: nuHasBeenSaved()
Steven,
I've seen that commit. But the changed nuHasBeenSaved() is not included in the latest commit anymore.
Also, this did not work for me either. I've tested it several times.
I've seen that commit. But the changed nuHasBeenSaved() is not included in the latest commit anymore.
Also, this did not work for me either. I've tested it several times.
if(nuIsNewRecord()){
window.nuTimesSaved = 0;
}
Re: nuHasBeenSaved()
toms,
What can I say, it works for me.
If it doesn't for you, make one yourself that does what you want.
Steven
What can I say, it works for me.
If it doesn't for you, make one yourself that does what you want.
Steven
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: nuHasBeenSaved()
Steven,
I've made a quick video to demonstrate the problem, as it's easier to show what I mean (with a brand new installation of nuBuilder Forte using the latest from Github, commit 13bf7ee2b4f0185923ba526e2980f56b1775efdc):
In addition, I run some tests with 2 other nuBuilder instances with Linux/Windows, MySQL/MariaDB.
All show the same results.
In the First Video:, I do the following steps:
1. Open a browse form: nuHasBeenSaved() returns -1 (correct!)
2. Add a new record
3. nuHasBeenSaved() returns 0 (correct!)
4. Refresh the record
5. nuHasBeenSaved() returns 1 (wrong!)
6. Refresh the record
7. nuHasBeenSaved() returns 0 (correct again!)
8. Refresh the record
9. 5. nuHasBeenSaved() returns 1 (wrong again!)
And this video shows what happens with the variable window.nuTimesSaved (console view):
I've made a quick video to demonstrate the problem, as it's easier to show what I mean (with a brand new installation of nuBuilder Forte using the latest from Github, commit 13bf7ee2b4f0185923ba526e2980f56b1775efdc):
In addition, I run some tests with 2 other nuBuilder instances with Linux/Windows, MySQL/MariaDB.
All show the same results.
In the First Video:, I do the following steps:
1. Open a browse form: nuHasBeenSaved() returns -1 (correct!)
2. Add a new record
3. nuHasBeenSaved() returns 0 (correct!)
4. Refresh the record
5. nuHasBeenSaved() returns 1 (wrong!)
6. Refresh the record
7. nuHasBeenSaved() returns 0 (correct again!)
8. Refresh the record
9. 5. nuHasBeenSaved() returns 1 (wrong again!)
And this video shows what happens with the variable window.nuTimesSaved (console view):
You do not have the required permissions to view the files attached to this post.
Last edited by Anonymous on Wed Aug 29, 2018 9:02 pm, edited 8 times in total.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: nuHasBeenSaved()
And here comes the 2nd video:
The form uses PHP AS nuReturnNewRecord()
1. Add a new record
2. Save
3. nuHasBeenSaved() returns 1 instead of 0 (because nuReturnNewRecord() has opened a new record)
4. Save again
5. nuHasBeenSaved() returns 2 instead of 0 (because nuReturnNewRecord() has opened a new record)
The form uses PHP AS nuReturnNewRecord()
1. Add a new record
2. Save
3. nuHasBeenSaved() returns 1 instead of 0 (because nuReturnNewRecord() has opened a new record)
4. Save again
5. nuHasBeenSaved() returns 2 instead of 0 (because nuReturnNewRecord() has opened a new record)
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: nuHasBeenSaved()
With commit b8e0602943fa1778cb2cf047ff96c878b1272c7d nuHasBeenSaved() looked like thisadmin wrote:toms
Its commit b8e0602943fa1778cb2cf047ff96c878b1272c7d.
Steven
A few days later, with commit 339abd815844fd394ae36fb8582c68f462e25c55, nuHasBeenSaved() looks now like this (again)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: nuHasBeenSaved()
Steven,
I pulled the latest commit (d2a29084e3e27377c2e02a99d2ade5c5fdb73188) and run update. There are no changes where window.nuTimesSaved() / nuHasBeenSaved() is used.
I do the following steps (Video)
1. Open a browse form: nuHasBeenSaved() returns -1 (correct!)
2. Add a new record
3. nuHasBeenSaved() returns 0 (correct!)
4. Refresh the record
5. nuHasBeenSaved() returns 1 (wrong!)
6. Refresh the record
7. nuHasBeenSaved() returns 0 (correct again!)
8. Refresh the record
9. 5. nuHasBeenSaved() returns 1 (wrong again!)
And this video shows what happens with the variable window.nuTimesSaved (console view)
I pulled the latest commit (d2a29084e3e27377c2e02a99d2ade5c5fdb73188) and run update. There are no changes where window.nuTimesSaved() / nuHasBeenSaved() is used.
I do the following steps (Video)
1. Open a browse form: nuHasBeenSaved() returns -1 (correct!)
2. Add a new record
3. nuHasBeenSaved() returns 0 (correct!)
4. Refresh the record
5. nuHasBeenSaved() returns 1 (wrong!)
6. Refresh the record
7. nuHasBeenSaved() returns 0 (correct again!)
8. Refresh the record
9. 5. nuHasBeenSaved() returns 1 (wrong again!)
And this video shows what happens with the variable window.nuTimesSaved (console view)
-
- Posts: 92
- Joined: Mon May 14, 2018 3:26 pm
Re: nuHasBeenSaved()
Same issue heretoms wrote:Steven,
I pulled the latest commit (d2a29084e3e27377c2e02a99d2ade5c5fdb73188) and run update. There are no changes where window.nuTimesSaved() / nuHasBeenSaved() is used.
I do the following steps (Video)
1. Open a browse form: nuHasBeenSaved() returns -1 (correct!)
2. Add a new record
3. nuHasBeenSaved() returns 0 (correct!)
4. Refresh the record
5. nuHasBeenSaved() returns 1 (wrong!)
6. Refresh the record
7. nuHasBeenSaved() returns 0 (correct again!)
8. Refresh the record
9. 5. nuHasBeenSaved() returns 1 (wrong again!)
And this video shows what happens with the variable window.nuTimesSaved (console view)