Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

User Workflow Constant Update

knnwndlm
8 - Asteroid

Hi SME,

 

I have a complicated workflow that has an user workflow constant (Year) permeated throughout.  I have to update this constant for multiple times for each run.  For example, if I have to run the workflow for 5 years, I would have to update the constant five times for each run. 

 

I have built an iterative macro to give me a dynamic input for a list of years, but I'm unclear on how to use it to change the user workflow constant so that I don't have to do it manually one at a time for multiple years.

 

Could you please provide some insights on how I can approach this problem?

 

Thanks,

kwl

25 REPLIES 25
dho111
7 - Meteor

I would take a step back and rebuild the workflow if possible. First create the user input in a Text Input tool then append the fields to the dataset. That way the user can easily find and update the Year. If you need to turn this into an app/macro, you can easily update the value in the user input fields. 

 

screenshot2.JPG

 

I can't tell how complex is your workflow. I just used Find "%User.Year%" and Replace ALL [User_Year]. Hope this helps. 

screenshot1.JPG

geraldo
13 - Pulsar

@knnwndlm 

 


aren't these 2 parentheses
remove 1 of them

 

geraldo_0-1687470770264.png

 

 

 

knnwndlm
8 - Asteroid

@dho111 - In the Find/Replace tool, I don't have the options to write out the expression %User.Year%.  Everything's in a dropdown.  Don't see the Search Location and Replacement where I can write a full expression.  I'm using version 2023.1.1.123 - about to upgrade to the one that was released yesterday.

knnwndlm
8 - Asteroid

@geraldo - I did remove one of the parenthesis but still got an error.  Didn't like the reference to the user workflow constants.

dho111
7 - Meteor

I was using the simple find function under Edit-> Find. (Ctrl + F). Not the Find Replace Tool. 

knnwndlm
8 - Asteroid

@dho111 - Thank you! 

Labels
Top Solution Authors