Paste & run SQL query in list

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 12:43 PM
Hi guys,
I have the cmdb_ci_service table loaded in list view, and I have this simple SQL query:
sys_class_name=cmdb_ci_service_business^ORsys_class_name=cmdb_ci_service^ORsys_class_name=cmdb_ci_service_technical^operational_status=1
I want to paste & run the query, in the list view. I know I've done this many times in the past, but now I can't find a way to make it work. Help!
cheers /Tommy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 12:46 PM
Hi Tommy,
I believe it is the other way round. We can copy a query from List view and use it as EncodedQuery(). Alternatively, we an pass it the URL directly by replacing special characters with related HTML values.
Unsure, if there happens to be something else.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 12:53 PM
Hi Jaspal,
thanks for the quick reply! I know the others but I was certain I've right-clicked or something somewhere (although now I'm thinking It might just have been wishful dreaming)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 12:58 PM
Well, I wish the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2025 07:05 AM
Paste the query after "sysparm_query=<You Query> and try running it. It works for me.
Hope it helps someone.
Regards