Jump to content

Recommended Posts

Good morning all,


I am trying to search against some multiple queries in a ServiceNow table.


Essentially, what I want the workflow to do is be able to add in a new field + operator + term with each query I enter, that way I don't have to hard-code a certain count of queries.


To break it down, my initial search, with one query, would look like this as a URL:



Or, if I wanted to add two terms, it would append this to the URL: ^close_notesLIKEQuery2

The full URL would look like:



Regarding entering the queries into the Alfred searchbar, I'd like to have some keyword, like 'eespc' (erik e, search past cases) and then add in the queried terms, separated by commas, where each added comma + term would append a new ^close_notesLIKEQuery2^close_notesLIKEQuery3, ^close_notesLIKEQuery4, etc. to the URL.


So, I could press CMD + Spacebar and do 'eespc Query1, Query2, Query3', and each queried term would show up in it's own appended '^close_notesLIKEQuery' URL piece.


Can someone please help me to do this? I'm very new to using Workflows in Alfred, but I know this would be SO helpful to have for daily productivity, etc.

Thank you all so very much!!



Link to comment
6 hours ago, Erik E said:

I understand that I need to split the argument to variables


Right idea, wrong tool. You do have to split the argument, but not into variables. In this case you have to do it in the code itself. Try this Workflow.


6 hours ago, Erik E said:

To break it down


Thank you for breaking it down so well. Made it really easy to understand what you were after and how to code the behaviour.

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