Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Pause/Wait/Hold Tool

ScubaGeek
7 - Meteor

Hello,

 

I am trying to build a macro that pause flow-through of its DataStream for a user-defined amount of time, after the the module's Run function is pressed.

 

Basically it will be a modified Block Until Done tool. Where it blocks the stream until a defined amount of time passes from when the user hits the Run button.

 

Is there a way to track/record when the run button is hit, allowing a start point for code to build a countdown? I am assuming I have to build an R or Python script to do this. I am at the exploration stage, so I am not sure how I will build this, but for now I am just trying to find out if there is a way to identify when the module's run is engaged.

 

Thanks.

7 REPLIES 7
IraWatt
17 - Castor
17 - Castor

Hey @ScubaGeek,

You can use the run time events to identify when run is pressed.

IraWatt_0-1654717153833.png

It is also possible to stop the workflow for a given time using the Python tool and the time library: 

 

import time
time.sleep(3)

 

An Alteryx app could allow a user to pass a given amount of time to the python tool.

 

 

CarliE
Alteryx Alumni (Retired)

@ScubaGeek,

 

you can download CReW macros from Chaos Reigns Within

 

There is a tool in that package called "wait a second" --  this tool allows a user to specify a wait time between records passing through the tool.

 

 

If this helped to solve you're issue, please make sure to mark it as a solution to help out other members of the community.

 

Thanks :)

Carli
PhilipMannering
16 - Nebula
16 - Nebula

Here's a macro I built recently... see if you find it useful.

 

 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @ScubaGeek!


Will you kindly let us know if any of these solutions worked for you?


Thanks,
Deb

ScubaGeek
7 - Meteor

This is exactly what i was looking for! Thank you!

CAJay
6 - Meteoroid

solution which I could think of using R tool, on Alteryx wait issue please find below

 

Basically 2 tools are being used to arrive at the solution –

Block until Done and R language Tool

 

Under Block until done tool

1st  Stage add R Language tool and run below script – (”30” in script means 30 seconds , which can be changed accordingly)

2nd Stage add the relevant tool needed as per your requirement

 

A1.pngA2.png

 

R Script below

 

testit <- function(x)

{

    p1 <- proc.time()

    Sys.sleep(x)

    proc.time() - p1 # The cpu usage should be negligible

}

testit(30)

Bria_Davis
5 - Atom

This macro package has been a life saver!! Thank you for posting this.

Labels