Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Analytic App, how to update the string of a formula based on input

wonka1234
10 - Fireball

Hi,

 

How can I update the string of my formula dynamically?

 

 

 

wonka1234_1-1674141523699.png

 

i want to update the date in quotes or have the user input into here.

 

5 REPLIES 5
JamesCharnley
13 - Pulsar

@wonka1234 

 

You'll just need an action tool connected with these settings, pointing at the expression, and at the bottom of the action configuration pane just making sure you're replacing the date only. That way whichever date the user inputs into your date input will dynamically replace the date in the formula.

 

JamesCharnley_0-1674142667241.png

 

jemma669
7 - Meteor

@wonka1234  If you connect a Date and an action interface tool with your formula, you can then highlight your formula to be update each time this is run as an app. You will need to configure the action tool to Replace a specific string and ensure you add the date that is included in your formula. This will ensure that each time this is run as an analytical app the user will be able to specify the data and change it as required.

 

jemma669_0-1674143918520.png

 

wonka1234
10 - Fireball

@jemma669 @JamesCharnley  thank you.. but what if i have multiple strings?

ie :

 

 

elseif [c_Action_Date] <= "2021-11-13" then [202202]
elseif [c_Action_Date] <= "2021-12-13" then [202203]

JamesCharnley
13 - Pulsar

@wonka1234  If you wanted to replace the different strings with the same date then you could keep one Date tool and just have another action configured to point at the second string from the same Date tool. If you wanted two dates, you'd have another Date tool for them to select another date and still another action changing the second one.

jemma669
7 - Meteor

@wonka1234 exactly as @JamesCharnley mentioned 😀

 

Example below.

Labels