Jump to content
Phylodome

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

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

I want to have multiple keywords that drive into a common script.

 

So yes, I was hoping for the same feature.

 

My current workaround is to use script filter with the "default" value being in the autocomplete

 

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...