Is there a way to log the search result of a custom table?

Mel A
Tera Expert

Similar to the attached screenshot, i want the searches on my custom table be logged to sys_search_event_list, whether search is made in the portal, on the platform or in the agent workspace. Is there a way to this?

1 ACCEPTED SOLUTION

Hi @Mel A ,

I believe you can use "sys_search_source_event" table, which is present as "Search Events per source"

The Search Event per source [sys_search_source_event] table stores records correlating search strings with results from a specific table, here called a data source. A search can query multiple tables. The sys_search_event table lists one record for the entire search, while the sys_search_source_event table lists one record for each data source (table) queried.

For more details, visit this:

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/search-admini...

 

Although, its not recommended to build reports on the system tables, but if you can break down the number of records with filter condition, that can workout.

https://docs.servicenow.com/bundle/tokyo-now-intelligence/page/use/reporting/concept/c_ReportOnSyste...

 

Best Regards
Aman Kumar

View solution in original post

6 REPLIES 6

Aman Kumar S
Kilo Patron

Hi @Mel A ,

Just out of curiosity, why exactly do you want to do that?

Is the OOB logging not able to meet your requirement, unnecessarily storing the logs in a different table.

 

Best Regards
Aman Kumar

Hi @Aman Kumar S , thank you for the reply. The requirement is to have an adoption report, if the users are actually using the custom application/table that we made. We also want to find out how may searches are made by a particular user.

Hi @Mel A ,

I believe you can use "sys_search_source_event" table, which is present as "Search Events per source"

The Search Event per source [sys_search_source_event] table stores records correlating search strings with results from a specific table, here called a data source. A search can query multiple tables. The sys_search_event table lists one record for the entire search, while the sys_search_source_event table lists one record for each data source (table) queried.

For more details, visit this:

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/search-admini...

 

Although, its not recommended to build reports on the system tables, but if you can break down the number of records with filter condition, that can workout.

https://docs.servicenow.com/bundle/tokyo-now-intelligence/page/use/reporting/concept/c_ReportOnSyste...

 

Best Regards
Aman Kumar

Hi @Aman Kumar S , this is very helpful. Can you guide me on how the searches on my custom table be logged in sys_search_source_event? Thank you.