Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Is there a way to retain CDT values on page reload/refresh?

Certified Associate Developer

I have a requirement in an application to retain values even if use refresh or reload the page. 

Is there a way to retain CDT values on page reload/refresh?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    More info is needed in order to help with this - for instance, what "page" are we talking about?  Are you talking about using the hard refresh in-browser (like hitting F5), or some internal refresh button/link on the interface?  What CDT values are you talking about and where are they currently being stored?  Can you give a big picture overview of the current behavior in a bit more detail, and what you would hope could happen instead?

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Thanks for the response!

    Actually, I have an application where the user is attempting an entry test with some questions and a timer. While the user is answering questions, if a hard refresh is performed, it should be in the same position like his answers should remain there and not lost and timer should be at the same time.

Reply Children
  • 0
    Certified Lead Developer
    in reply to ahmedh518637

    If the user's data inputs are saved into Rule Input variables during a task in a live process instance, then doing a hard refresh will cause the browser to ask the user to confirm they want to leave the current page.  If the user insists, then I don't know of any easy functionality by which to prevent their data from being cleared.  One fairly easy way to prevent this is to allow a user to save in-progress form values, which is built in functionality.

  • I guess the best solution (even though it is not a best practice) is that once the user enters a value, you do a do "saveInto" with a!writeToDataStoreEntity.

    I have never tried, but I guess this should work.

                          a!textField(
                            label: "",
    ...
    ...
    saveInto: a!writeToDataStoreEntity( dataStoreEntity: cons!APP_DS_FORM, valueToStore: ri!myCDT, ... ) )

  • 0
    Certified Lead Developer
    in reply to ManuelHTG

    Agreed, this could potentially work, though it requires, perhaps, exponentially more manual setup and manual upkeep.  A slightly stronger solution might be to give a soft "save" button (not the default OOB one) that saves a CDT value to the DB when the user chooses; though using the same manual approach could also submit the task, save the values to PVs, then reopen the task which would perhaps be better.