Alteryx Designer Desktop Discussions

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

Adding a Parameter that will change text in a formula

jonathonallen
6 - Meteoroid

I have a formula that creates a column based on a user-inputted date. I want to make it easier for someone to change the formula. What is the best way to have a parameter pop up when running the workflow that can change this text within the formula? (I've attached a screenshot of the formula)

 

Thank you in advance for any help

9 REPLIES 9
jdunkerley79
ACE Emeritus
ACE Emeritus

This can be done as an Analytic App. You can use a Date Interface Tool to let the user end a date.

jdunkerley79_0-1598685471667.png

 

Have attached a simple example showing a formula taking the input from the Date interface tool.

jonathonallen
6 - Meteoroid

Thanks for the quick response. When I run this as an analytic app, I am unable to select a date other than today (8/31/2020). Anything else I need to add for the user to be able to select a date?

danilang
19 - Altair
19 - Altair

Hi @jonathonallen 

 

What exactly do you mean by "I am unable to select a date other than today (8/31/2020)"?  Can you post some screen shots?

 

Dan 

jonathonallen
6 - Meteoroid

See attached. I have selected July 31, however the workflow continues with the current date (91/).alteryx.PNG

danilang
19 - Altair
19 - Altair

Hi @jonathonallen 

 

I can't quite see it, but it looks like your connected the Q output of the Date tool to the Q input of the Formula tool (in green below)  

 

q.png

You need to disconnect this and connect the Q of the Date Input tool to the lightning bolt of the formula.  This will add an Action Tool between the 2 where you can specify how you want the date substituted into your formula

 

Dan

 

 

 
 

 

jonathonallen
6 - Meteoroid

Thanks- I think I am getting closer.

 

See below for the formula. The "[#1]" needs to be replaced with the date. How would you configure this?

Formula.PNGUpdate value.PNG

grazitti_sapna
17 - Castor

Hi @jonathonallen , try this, you do not need to add an action tool for updating the value you can directly use #1 in the formula tool as shown below. In such case the value will be directly reflected in the formula tool as you select in the date tool of the date interface tool.

I hope this solves your problem.

 

grazitti_sapna_0-1599030112322.png

Thanks.

Sapna Gupta
jonathonallen
6 - Meteoroid

I might be missing something, but I am unable to change the date from the current (today's) date when prompted with the calendar. How would you run the workflow you created if the date for the formula needed to be 7/31/2018 for example?

grazitti_sapna
17 - Castor

@jonathonallen , you can create a new field in formula and pass #1 as a value the value you will select in the prompt will be displayed in the field as well.

 

I am able to select the value. 

 
 

{166F6FE9-EE86-414D-A0AC-A476753470B6}.png.jpg

 
 
 
 

 

 

{75512CCE-B888-4F75-AE7C-30A97ACEFC17}.png.jpg

 

To run the workflow as analytical app click on the wand icon next to the run icon.

 

I hope it helps.

 

Thanks.

Sapna Gupta
Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels