Alteryx Designer Desktop Discussions

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

Restrict the analytical app to be run only once in a month

npeddagorla
7 - Meteor

Hello All,

 

I have an analytical app that is installed in a users desktop. I want to restrict the user to run that workflow only once in a month. If the user try to run this second time workflow should stop him from running that.

Any solutions would be greatly appreciated.

Thanks in advance.

 

Regards,

Naveen.

6 REPLIES 6
AbhilashR
15 - Aurora
15 - Aurora

Hi @npeddagorla, by saying an app is installed on users desktop, I am assuming you mean they have the Alteryx Designer installed on their machines? If that is the case, then there is no out of the box solution to restrict them from running the flow more than once.

DavidP
17 - Castor
17 - Castor

The quickest way I can think of is to build something into your workflow that creates a field such as [last run] = datetimenow() and writes it to a file on the local drive, say .\lastrun.yxdb

 

As the 1st step in your workflow you can load lastrun.yxdb and use a filter and Test tool to evaluate to condition datetimemonth([lastrun]) != datetimemonth(datetimenow())

 

You can set the test tool to generate an error if the confition is false and stop the workflow.

fmvizcaino
17 - Castor
17 - Castor

Hi @npeddagorla ,

 

Attached is a solution showing an idea of a solution. The idea is to write in a file or database table the last execution time and to check that date everytime the app runs.

 

 

Let me know if this makes sense to you.

Best,

Fernando Vizcaino

fmvizcaino
17 - Castor
17 - Castor

Omg @DavidP , we are so connected!! hahaah

I've just developed your suggestion. 

DavidP
17 - Castor
17 - Castor

Hey Fernando, another great minds moment!

MedinaE1
5 - Atom

Hi @fmvizcaino

 

I was wondering if you can assist me with your example. I understand that if I select "Cancel Running Workflow on Error" under the runtime options, the workflow should stop running when test tool errors out. That being said would you happen to know why the Block until done tool continues to run the flow after the error is activated? For output 2 on the Block until done tool, I replaced the browser tool with an output tool (excel file). The file still generates after the error occurs.

Labels