HI All,
i am using the service now input tool to connect directly to SN tables to fetch data in alteryx workflows. However, one of the tables contains over 20M records and i need to figure out a way to filter the records before the input tool fetches all the records.
In the input tool there is an option for customer query but i am struggling with understanding the correct syntax.
Select * from task_sla where task = "e7962b741b6b89d4d68a0d0cf94bcb20";
i tried using this query where i want to pull records for the particular task id. however it is not working.
if anyone can help in figuring out the right query to filter the data i would be very helpful.
Thank You
SR
I sincerely hope you have figured this out, but for those who are also searching for the answer to this, I spent most of this afternoon trying a ridiculous number of variations. May I point out that the Information text does NOT really help:
I tried so many variations with "sysparm_query=" at the beginning, which apparently you should NOT do. I tried the display value, as the Information text shows, with and without double-quotes, to no avail. I tried the sys_id value with and without quotes. I finally got the expected results from this:
Hope this helps someone else from struggling!
It also took me a while to determine the correct syntax for multiple criteria, so I am also sharing what ended up working:
Is there a way to filter on a datetime?
Trying opened_at > 2024-07-23 00:00:01 does not yield any results - it looks like the connection is pulling the whole table.
Thanks!
Just figured out the correct syntax:
opened_at>=javascript;gs.dateGenerate('2024-07-23','00:00:00')
This link was super helpful in determining how to create the query:
More info on encoding custom query strings here:
I hope this helps!