To display a message after form timeout

Certified Associate Developer

Hi all,

After certain period of inactivity, the form cannot be submitted and the data entered are not saved.  So I want to display a warning message like "The data you have entered is not saved to the system due to timeout" after form timeout minutes.  How can I achieve this?  Any idea?  Thanks in advance.

Brinda Sateesh

  Discussion posts and replies are publicly visible

Parents
  • Could you use the refresh variable function? Here's what I'm thinking: you could load the page and capture the time the page was loaded using now(). Then, add a refresh variable that will update based on a timer. If this variable updates, the interface can then display a different message that the task has timed out. Here's an example:

    a!localVariables(
      local!pageLoad: now(),
      local!pageCurrentTime: a!refreshVariable(
        value: now(),
        refreshInterval: 1
      ),
      local!value,
      if(
        local!pageLoad + 1 / (24*60) > local!pageCurrentTime,
        /*Checks to see if the time has elapsed */
        
        a!textField(
          label: "Enter Data Here",
          value: local!value,
          saveInto: local!value
        ),
        a!richTextDisplayField(
          value: "The form has timed out!"
        )
      )
    )

Reply
  • Could you use the refresh variable function? Here's what I'm thinking: you could load the page and capture the time the page was loaded using now(). Then, add a refresh variable that will update based on a timer. If this variable updates, the interface can then display a different message that the task has timed out. Here's an example:

    a!localVariables(
      local!pageLoad: now(),
      local!pageCurrentTime: a!refreshVariable(
        value: now(),
        refreshInterval: 1
      ),
      local!value,
      if(
        local!pageLoad + 1 / (24*60) > local!pageCurrentTime,
        /*Checks to see if the time has elapsed */
        
        a!textField(
          label: "Enter Data Here",
          value: local!value,
          saveInto: local!value
        ),
        a!richTextDisplayField(
          value: "The form has timed out!"
        )
      )
    )

Children