brentsum Posted August 29, 2017 Share Posted August 29, 2017 Hey there, I'm pretty new to using variables, quick question: how do I make it so that when I type in "30" as a query, it sets the Delay Utility to 30 minutes instead of 30 seconds. I tried putting "{query}*60" into the Delay field but that doesn't seem to be working. Thanks! Link to comment
GuiB Posted August 30, 2017 Share Posted August 30, 2017 Hi! Think of placeholders as just string ( {query} is replaced to a string containing the user input ), so there's no math operations that can take place. If you put an equation, then it won't be evaluated, but you would get back the full string. Therefore, if you want to modify a query, then you would need another Workflow Object that can manipulate the query to send a modified version to the next object. For your use case, you would need to make a script (using a "Run Script" or "Script Filter" depending on how you want to interact with your workflow). The script would multiply the input by 60 and send the result to the next object (the output of the script become the {query} of the next object) Link to comment
brentsum Posted August 30, 2017 Author Share Posted August 30, 2017 Thanks so much, got it Link to comment
GuiB Posted August 30, 2017 Share Posted August 30, 2017 You said you got it, but I thought I would give an example in case someone is looking for a solution for that as well So here is a workflow that delay a notification based on the value (in minutes) that the user input : https://nofile.io/f/6umtyKnwZNw/Custom+Delay.alfredworkflow Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now