The CreatorCon Call for Content is officially open! Get started here.

Hard Code order_by in a cloned data table from instance widget

kemmy1
Tera Guru

I would like to hard code my already cloned widget to order by a field that is a reference field on the data.table

I found this online so I understand where I need to update this, but WHAT do I update data.o to?

 

The line data.o = data.o || $sp.getValue('order_by'); is a JavaScript expression commonly found in ServiceNow Service Portal widgets. It is used to set a value for the order_by property within the data object, which is typically used to pass information between the client-side and server-side scripts of a widget.

 

data.o = <table name>.<field>.<field>?

So it would be the actual name of the table, then the reference field and then the field on the referenced field? x_g_table.actualreferencefieldname.field?

 

0 REPLIES 0