Is there a way to autosave records?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Is there a way to autosave records?

Post by D Oliveira » 2018-04-17 20:31

Greetins, Im having some issues training older people to use the application that I have developed, they constantly forget to save the records, is there a way to set a timeout function every 5 seconds to autosave? Thank you

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Is there a way to autosave records?

Post by pbottcher » 2018-04-17 21:53

Hi,
I think you could acheive this via the setInterval(function() { YOURCODE }, TIMEOUT in millisecons). Put this in the TABLENAME-dv.js

e.g. setInterval(function() { $j('#update').click() }, 5000); where update is the button to save.

be aware that 5 seconds is quite short :-).

hope that helps
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: Is there a way to autosave records?

Post by D Oliveira » 2018-04-19 12:36

pböttcher wrote:
2018-04-17 21:53
Hi,
I think you could acheive this via the setInterval(function() { YOURCODE }, TIMEOUT in millisecons). Put this in the TABLENAME-dv.js

e.g. setInterval(function() { $j('#update').click() }, 5000); where update is the button to save.

be aware that 5 seconds is quite short :-).

hope that helps
Thank you for shedding some light on the issue, can you please share with me correct 'id' of the save button ? because $j('#update) is not working, thanks in advance

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Is there a way to autosave records?

Post by pbottcher » 2018-04-19 13:40

Hi,

hmmm, in my app the save-button do all have the id=update. I tested the above and it works for me. Can you use your Browser-development console (F12 for IE, Google, Firefox) to identify the button and see your id. Also, where did you add the code to?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: Is there a way to autosave records?

Post by D Oliveira » 2018-04-19 14:57

pböttcher wrote:
2018-04-19 13:40
Hi,

hmmm, in my app the save-button do all have the id=update. I tested the above and it works for me. Can you use your Browser-development console (F12 for IE, Google, Firefox) to identify the button and see your id. Also, where did you add the code to?
Hey I just found small jQuery syntax error involving select2 and now it works fine, apparently that was interfering, thank you all!

Post Reply