Skip to main content
hemantb0002
Known Participant
Jun 3, 2022 1:00 PM UTC
Solved

Refresh variables in 5 seconds

Hi All,

I have a requirement where first interface/section( with inprogress spinner gif) needs to be displayed for 5 seconds and then Second one.

I tried with refresh variable but we have minimum refresh interval of 30 seconds only.

Do we have any alternative way to do?

My Solution with 30 seconds interval ,

a!localVariables(
local!currentTime: now(),
local!waitingTime: a!refreshVariable(
value: local!currentTime + intervalds(0, 0, 5),
refreshInterval: 0.5
),
{
if(
local!waitingTime >= now(),
a!sectionLayout(label: "First", contents: {}),
a!sectionLayout(label: "Second", contents: {}),
)
}
)

mikes0011
mikes0011Answer
Brainy
Jun 3, 2022 3:14 PM UTC

My normal solution to this is to offer the user the "wait message" interface accompanied by a button that says "check again", which they can spam-click if they like, since all it does is submit the form, exit to the process, and loop back to the same form again, until the background action is completed in which case they get a success message on that form and a different button to click.

The Expression Guru

8 replies

stefanhelzle0001
Brainy
Jun 3, 2022 1:05 PM UTC

Sorry, 30 seconds is the limit and there is no other way of doing it.

hemantb0002
Known Participant
Jun 3, 2022 1:17 PM UTC

@stefanh0002 Thanks for quick reply.

Can we delay displaying an interface to user? I tried to add timer event before User Input Task in PM but it's breaking activity chaining and user is redirected to start form after time event execution.

stefanhelzle0001
Brainy
Jun 3, 2022 1:20 PM UTC

The way you mentioned will also not work as you found out.

Can you elaborate on what you want to achieve in a broader sense?