Jump to content
Sign in to follow this  
sklr

Workflow script filter with one-shot completion

Recommended Posts

Hi,

 

Currently, script filters are stateless -- if one takes an argument, the filter script gets called after each letter is typed in order to regenerate the suggestions list.

 

I've got a few cases where the full list of possible suggestions is known regardless of input, but the list is large and I'd like to allow the user to narrow down the options by typing more letters.

 

For example, I have a script filter 'foo' that returns options ['bar', 'baz', 'quux'].  As soon as the user types 'foo b', that should be reduced to ['bar', 'baz'], etc.

 

Of the two ideas I have involving this at the moment, the first has all of its data generated locally.  Therefore, I could update the generation script to take another parameter to filter results by without too much pain.  However, the second workflow gets its data from a JSON webservice.  The webservice isn't really designed for autosuggest, and is way too slow to consider calling it after every character.  Because of the stateless nature of filters, if I wanted to make this workflow useful I'd have to deal with caching request data somewhere, expiring the cache, filtering results, etc etc.  Do-able, but painful.

 

Would there be any value in a new type of script filter that accepts a single long list of items, each of which is valid, and then deals with allowing the user to narrow down the selection by additional typing without needing to call out to the original script again?

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.

Sign in to follow this  

×
×
  • Create New...