Skip to main content
March 3, 2022
Question

Auto save data from site page to DB

  • March 3, 2022
  • 10 replies
  • 0 views

Hi All,

We have a requirement where we need to automatically save data to DB from site page if user is not performing any action for defined time.
Please make a note that we looking for a solution which would save data without any user interaction.
Any help is highly appreciated.

Thanks!
Mayur Mondhe

10 replies

stefanhelzle0001
March 3, 2022

AFAIK, there is no supported way of doing this. What is the use case?

March 4, 2022

It is possible to configure a user input task to have an exception timer event. If an assigned task is not completed in time then the exception flow is triggered.

andrewh0007
March 3, 2022

The only thing I can think of is to have either a!writeToDataStoreEntity() or a!startProcess() configured into every single saveInto of every single component that a user could fill in on the site. This is cumbersome and a bit messy but you could get it to know everything a user input. Especially using a!startProcess() you could configure something to happen after a certain amount of time after the first input was received.

I've never had to do something like this but you would have to be careful of the refreshAfter variable (where available). If there's a large text input and someone never unfocuses this solution wouldn't capture that unless refreshAfter was "KEYPRESS". I've never tested anything like this so this suggestion is only an idea.

stefanhelzle0001
March 3, 2022

a!startProcess works only inside a saveInto which reacts on use input only. Same for a!writeToDataStoreEntity().

andrewh0007
March 3, 2022

Yes, totally understand this and wasn't suggesting it could work without user input. But if the use case is to know when someone goes to a site, starts entering details and then stops and doesn't submit then a!startProcess and a!writeToDataStoreEntity would work. Obviously this doesn't help if you need to know the moment they go to the site (what if they load the site and goes to lunch and only enters the first details when they return?) or if you need to know when the site is visited and no details are entered. Like in your response we'd need to know the exact use case to know suggest anything further.

amitm956894
March 3, 2022

AFAIK, This is not possible without any user click. Workaround: You can save users last input value through a click using a!writeToDataStoreEntity inside saveInto. but this can also be achieved by Save Draft option as well. So, auto save is not a feature of Appian till date.

March 7, 2022

Hi All,

As part of our POC, we are calling web API on refresh variable of the site page. The web API is responsible to save data to DB. This API gets triggered at an interval and saves the data. I would like to know if this would be a best approach to achieve auto save function or not .

Thanks!

Mayur Mondhe 

stefanhelzle0001
March 7, 2022

I consider this a bad practice!

But instead of discussing how to solve that, I would be more interested in the actual requirement? Why do you think this is necessary? What is the benefit?