Jump to content

Provide a default argument that will be used in place of a query in the event that no query is provided.


Recommended Posts

Proposed Feature:

 

Provide a default argument that will be used in place of a query in the event that no query is provided.

 

 

Rationale:

 

In my particular use case, I have workflows that are mapped to urls, with the keywords representing unique customer identifiers within local/qa/production environments.

 

For example:

app.ourdomain.com/feature/{query}/some/path

 

I'd like to have a single workflow that would populate the customerID field with a default value if no query is provided (the ID i'm working w/ 90% of the time), but that would still respect queries when they are used.

 

 

Possible Implementation:

 

Possibly something like:

app.ourdomain.com/feature/{query|1234}/some/path

Edited by Phylodome
Link to comment
Share on other sites

Proposed Feature:

 

Provide a default argument that will be used in place of a query in the event that no query is provided.

 

 

Rationale:

 

In my particular use case, I have workflows that are mapped to urls, with the keywords representing unique customer identifiers within local/qa/production environments.

 

For example:

app.ourdomain.com/feature/{query}/some/path

 

I'd like to have a single workflow that would populate the customerID field with a default value if no query is provided (the ID i'm working w/ 90% of the time), but that would still respect queries when they are used.

 

 

Possible Implementation:

 

Possibly something like:

app.ourdomain.com/feature/{query|1234}/some/path

 

Referencing your previous post, this could also be done with workflows now. For instance, set {query} to the variable $query. Check the value of $query. If it's empty, set $query to "foo" and proceed as usual with the default value "foo"

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

This seems similar to what I was looking for. I use multiple keywords to trigger things, and I would like to set a default argument from the keyword editor, instead of duplicating my logic in a bunch of copy/paste scripts :)

 

I have some ideas for Alfred's workflow future which should help address this kind of thing :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...