Jump to content

Chained Script Filter: How can use two script filter so that the selection from one is the arg for the second?


Recommended Posts

Hi,

 

I would like to chain to script filter. The selection from the first one is supposed to determine what I show in the second. How is that possible? I can not add two script filter to one workflow and chain them. Any ideas for work arounds? This should be possible!

 

Thanks!

Link to comment

Hi,

 

I would like to chain to script filter. The selection from the first one is supposed to determine what I show in the second. How is that possible? I can not add two script filter to one workflow and chain them. Any ideas for work arounds? This should be possible!

 

Thanks!

 

See our similar discussion here. This should give you a good idea of what some of the options are for achieving this. http://www.alfredforum.com/topic/1164-multiple-steps-with-feedback-in-a-workflow/

Link to comment

See our similar discussion here. This should give you a good idea of what some of the options are for achieving this. http://www.alfredforum.com/topic/1164-multiple-steps-with-feedback-in-a-workflow/

 

Thanks! Great suggestions. I am still not sure how to solve my problem though because of some additional features. I will try to explain my desired setup. This is all based on a database with items and the items have zero, one or multiple attachments. The first script filter shows the items in the database, the second the attachments for the selected item OR directly opens the attachment with there is only one OR reveal the item in the database if there are no attachments. The solutions described in David's link rely on 'valid' = 'no' and use the autocomplete setting. But the problem is that I either want to use a second script filter that shows the attachments (for which I would use valid = no and autocomplete) or want to run an action (if are no or only one attachments or when the user holds down cmd). I don't know how to combine these two because setting valid = no (for the second autocomplete) prevents me from running an action under certain conditions when I want to skip the second filter. Does that make any sense? (below is also a shorter description).

 

Suggestion: These kind of problems could be solved if it would be possible to connect two script filters and allow a script filter to take input from the last one. It would basically be a script filter at the 'action' stage of the flow diagram taking the arg parameter from the last script filter (or other stuff) as input. That would be a really nice and much lass hacky solution for multi stage script filter.

 

 

 

Script Filter

Filter items in database based on query

When item is selected, do either of the following three actions

     (a) if there are multiple attachments

     ( B) if only one attachment

     © if there are zero attachments

When item is selected with cmd key pressed, run action ©

 

Actions

(a) show list of attachments ('second' script filter)

          run action ( B) if selected, or © if selected with cmd

( B) open file attachment (open file action)

© reveal item in database

 

 

Edit: my ( b ) and ( c ) were converted but you the smily still works as a reference.

Edited by greghoch
Link to comment

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...