This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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.
Here is a photo of my file (it is attached as well).
I 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.
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").
@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:
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:
That should do the trick. If you want an alternate and undocumented method that I prefer, then I would change my formula tool to:
I had to rename the interface tool to Date (click on the tool, then click on the annotation button 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.
@jedwards543I'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:
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
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 with hard coded dateAction tool configured to "Replace a specific string"
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.