Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

live list update, how to get the data that was updated?

fredrik_
Tera Expert

Hello all,

im using a list in csm workspace and we want to use the live list feature.

we can see that an update to the list have happend because a number appears next to the refresh button above the list.

 

is there any way i can see what have updated? what the case number(item in the list) or sysid of said item is?

 

i want to be able to create a refresh on the list

- but only for matches on certain conditions, eg assigned_to is not empty and field* is value*.

- not always.

 

i have tried logging different event payloads and api data but i can not seem to figure out where the data that sets the number next to the refresh button comes from.

 

i have also tried adding "list controller" as data resource to the ui builder page to try to use the "liveUpdatesCount" however i can not get it to react at all.

 

i am using legacy list template and list controller has to be added manually.

 

grateful for any input 🙂

1 ACCEPTED SOLUTION

fredrik_
Tera Expert

we have found a solution.
we will use data resource record watcher and match the query to our lists showing.
we will then check the payload for the event in a client script. if one of the changes is assigned to we will set a client state parameter to a number, if the number gets to a certain point, we will call refresh list script.

View solution in original post

1 REPLY 1

fredrik_
Tera Expert

we have found a solution.
we will use data resource record watcher and match the query to our lists showing.
we will then check the payload for the event in a client script. if one of the changes is assigned to we will set a client state parameter to a number, if the number gets to a certain point, we will call refresh list script.