Luther Posted December 17, 2021 Share Posted December 17, 2021 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: https://support.servicenow.com/sn_customerservice_case_list.do?sysparm_query=close_notesLIKEQuery1 Or, if I wanted to add two terms, it would append this to the URL: ^close_notesLIKEQuery2 The full URL would look like: https://support.servicenow.com/sn_customerservice_case_list.do?sysparm_query=close_notesLIKEQuery1^close_notesLIKEQuery2 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
Luther Posted December 17, 2021 Author Share Posted December 17, 2021 I understand that I need to split the argument to variables, but I do not know how to build and launch the URL after that so that it is dynamic and doesn't expect a hard-coded query count (e.g. one, two, three, etc queries). Link to comment
vitor Posted December 17, 2021 Share Posted December 17, 2021 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. Luther 1 Link to comment
Luther Posted December 18, 2021 Author Share Posted December 18, 2021 Thank you SO much, vitor!! I am so grateful for your help!! Link to comment
Luther Posted December 18, 2021 Author Share Posted December 18, 2021 Truly, I cannot thank you enough. This is going to be so, immeasurably helpful in my day-to-day, Vitor. THANK YOU! Vero 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now