UI Builder - Refresh a list when amount of records change or refresh after time interval

Jonas VK
Tera Guru

Hi all,

I am trying to make a list to refresh automatically when the amount of records from the list changes or after a certain time interval.
The client wants that after a record changes state, after fullfilling the record conditions, (this is done in a second tab in the list, not from the list quick edit)  the list automatically update so the user doesn't have to press the refresh button.


Is there a psosible way to accomplish this?

Thanks in advance.  

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Currently, the only way to programmatically refresh a list component is to bind a client state parameter to the component and pass the client state parameter a timestamp that tells the list when it should refresh (usually just the current time). The oob list page already has this setup so I think you could achieve what you're looking for by doing something like:

  1. Clone the list page to a new variant
  2. Add an optional parameter to the list page for the page refresh
  3. Bind the optional page parameter to the listRefresh client state parameter
  4. On your form page, using whatever event needs to trigger the refresh, route the user back to the list page and pass the current datetime into your optional parameter on the list page. It shuold cause the list to refresh.

View solution in original post

6 REPLIES 6

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Currently, the only way to programmatically refresh a list component is to bind a client state parameter to the component and pass the client state parameter a timestamp that tells the list when it should refresh (usually just the current time). The oob list page already has this setup so I think you could achieve what you're looking for by doing something like:

  1. Clone the list page to a new variant
  2. Add an optional parameter to the list page for the page refresh
  3. Bind the optional page parameter to the listRefresh client state parameter
  4. On your form page, using whatever event needs to trigger the refresh, route the user back to the list page and pass the current datetime into your optional parameter on the list page. It shuold cause the list to refresh.

The issue here is that the i am using the List Nav Component, so I am staying on the same page, just a iffrent tab in the List nav, so sadly this doesn't work for me.

How do you "Bind the optional page parameter to a client state parameter"?

 

I have created the optional parameter, but do not see any way to bind it. There is no hover edit/bind icon. Clicking the pill does nothing.

 

@mcclainc1 the binding would happen on the client state parameter itself