Saving record from an interface

Certified Lead Developer

Hi Team,

We have multiple sections in the form and user will be updating them in between of time. (Interval of 5, 10, 15 minutes or an hour)

User want data to be saved as soon as they enter or select on the form and no save button.

I am thinking of off focus save like when user enters data and come out it should be saved in the record/db. Challange is what if they change the data.

Can you suggest any other way to handle the requirement considering performance point and no data loss.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    It's a challenging scenario, and potentially a conflict between the typical design paradigms supported by Appian, versus user expectations which can sometimes reach into the fantastical / "magic wand" type category, even if individual pieces seem reasonable.

    One particular design occurs to me - if this is the one place you need this sort of thing, and the criticiality is high - you could potentially design a specialized "save target" database which would serve to save just a temporary copy of all fields, which is then wiped out when the form is submitted and the "real" copy of the data is written to your normal DB table(s).

    That is, have a special table that maps (just) to this form's inputs, and creates a new row immediately anytime a user starts filling it out (after querying to see whether they have a partially completed copy, in which case that version is loaded instead).  Every single field could attempt a "write to data store" after user interaction, which again for something critical, might be worth the performance hit.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    Either you just save it whenever the user unfocuses from the field. Or you could do something like Mike is suggesting. Perhaps an intermediate way would be to save json versions of the data every time a field is updated without updating the fields until an actual save is done at some point. if the person loses their session, you allow them to either go back what is in the DB or the last saved json temporary file.

  • 0
    Certified Lead Developer
    in reply to Mathieu Drouin

    The JSON approach would be great too especially in cases where there might be multiple different forms that need to be handled in a similar manner, and you want to maximize flexibility with respect to what fields are there (and how they save).  I've done something similiar in the past for instantly-persisted custom-built user filters, on a per-user basis and across multiple different forms, but never really for a form like this where the question is persisting partially-completed form data.

  • 0
    Certified Lead Developer

    I would try to push back this "requirement". The reason is, that you might have to implement this UX pattern on all interfaces in all applications once introduced. To keep UX consistent, I recommend to stay to the Appian OOTB supported features as close as possible.

    Is it possible? Yes! Is it worth the effort for building and maintaining? Better be sure!