community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

How to use the Date interface tool?

Highlighted
Meteoroid

I am trying to use the interface tool for the first time. I would simply like to be able to manually select a date when I run the file. I would like that date to then be entered as the value of a variable.

 

Currently, I am only able to change the name of the variable to the selected date instead of the changing the variable values themselves.

 

file.PNGHere is a photo of my file (it is attached as well).

 

 

 

 

 

 

 

 

 

 

date.PNGI would simply like to change the "Date" variable from "dummy" to the date selected in the date interface tool. I have tried changing the data type to datetime, but it only works with string. It throws an error otherwise. Not sure why.

 

 

update.PNG

 

When selecting "expression" (as currently in the photo), it changes the name of the variable ("Date") to the date selected in the interface tool (ex "2017-05-11"). When I select "field" it changes the value of the variable from "dummy" to "2003." I have no idea where it is getting 2003 from. I would like to change the value of the variable from "dummy" to the date selected in the interface tool (ex "2017-05-11").

 

Any help is appreciated!

 

 

@jedwards543 So close! It looks like the date input interface tool doesn't pass quotes. You can verify this for yourself by using the interface designer (View>Interface Designer) and selecting the second option (test view) and then open debug. I got something like this:

 

Capture.PNG

You can see that you really want "2017-05-11" with quotes. To resolve this, I would change your action tool to replace a specific string at the bottom:

Capture.PNG

 

That should do the trick. If you want an alternate and undocumented method that I prefer, then I would change my formula tool to:

 Capture.PNG

I had to rename the interface tool to Date (click on the tool, then click on the annotation button Capture.PNG and change the name). If you click back on your canvas and then go to the workflow configuration tab, you can now set a test value there and can hit run like a workflow to pass the variable. When you run it as an app, that test value is completely ignored and the user input is instead passed. This method is great because it requires no action tools, and allows you easily send test values through there.

 

Let me know if you have any questions!

Moderator
Moderator

Hello,

 

This post has been moved to Publishing & Gallery for greater visibility.


Thanks!

Jess Silveri
Premium Support Advisor | Alteryx
Meteoroid

Thank you! It worked.

 

workflow.PNGI do have one follow up question. When I go to the workflow configuration tab, the picture to the right is what I see. I do not see a "test value" option. What am I doing wrong?

 

Thank you!

EDIT: I see you got it working on your own!

@jedwards543 I'm attaching a working example. My guess is that in your action tool you're including the quotes ("%Question.Date%") and should be excluding the quotes (%Question.Date%). I could be wrong though. Using the interface designer and open debug may help illuminate the situation.

 

For your picture, I was being loose with my terminology :) The three columns are are type, name, and value. The type and name are used to call the object (like %type.name%, which in our case is %Question.Date%). The value is used when running as a workflow (it's replaced by the user input value when running as an app). So from that screen you can type in 2017-05-11 like this and run it as a workflow to see how it works:

Capture.PNG

 

Meteoroid

Ah I see! Thank you for your quick response and helpful insight!

Asteroid

Hello,


I try to do some workflow. My initial file have two colomns : Initial-date and end date. I would like to be able to manually select a end and initial date when I run the file. I would like that end and initial date be entered as the value of a variables.

It's work but i need that the end date is written in the cell B2 and initial date in the cell A2.

 

I join the screenShot of the present result and also my woorkflow 

 

Captur.PNGCapture.PNG

 

Thank you for your help in advance

Atom

I'm trying to do something very similar. I have a hard coded date in the formula tool. I'm trying to have the user update the date to whatever they want. My current Action tool configuration is not allowing me to do that. What am I doing wrong?

Formula tool.JPGFormula tool with hard coded dateAction tool.JPGAction tool configured to "Replace a specific string"

Alteryx Certified Partner
Alteryx Certified Partner
Well the date being passed into the interface tool will be in YYYY-MM-DD format so you might be getting a conflict because you are then running a dateparse against that when actually it's already in the correct date format.
Atom

Got it, date parse was the issue and removing it resolved the issue! Thanks.Formula tool.JPGUpdated formula without date parse. I removed the Action tool and it seems to work.

Labels