Table "sp_log" capturing the keyword entries, need to know the script doing this

pushkarganpule
Kilo Contributor

I am working on service portal. There is a search field on the portal home page. When user type any keywords in the search field. Their is one table[sp_log] capturing the keyword entries. I want to know which code inserting those Records to the table. I go through the widget script, but unable to found which script doing this. I want to implement same functionality in the customized search widget .

1 ACCEPTED SOLUTION

SatheeshKumar
Kilo Sage

Hi pushkar,

 

Currently we dont find any documentation from servicenow but you use the above suggested function to get the desired functionality.

check the atttached snapshot!!

Thanks,

Satheesh

 

 

View solution in original post

5 REPLIES 5

SatheeshKumar
Kilo Sage
Hi Puskar, Use below codes $sp.logStat('param1', 'param2', 'param3', 'param4') that I have seen other OOB widgets use. I have been able to figure out that param1 populates type field (string), param2 populates table field (table name), param3 populates ID field to the record on the table (sys_id), param4 populates Text field (string). Thanks, Satheeshkumar Mark correct if it resoles your issue

Hi Satheeshkumar,

Okay, I will try this script. But when I looked into the search widget(SN default widget) their is no such code use to insert entry in the table[sp_log]. So how the entries are getting captured in the table when user search fromthis widget. 

Regards,

Pushkar 

SatheeshKumar
Kilo Sage

Hi pushkar,

 

Currently we dont find any documentation from servicenow but you use the above suggested function to get the desired functionality.

check the atttached snapshot!!

Thanks,

Satheesh

 

 

Hi Satheesh,

 

Yes, this worked for me. Thanks alot for quick help 🙂

 

Regards,

Pushkar