Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

[UI Builder] Dynamically group a column on list component

Chris176
Tera Contributor

Hi all,

 

I am encountering an issue with the list component on a page. I have attempted to look through various resources but I am unable to figure out how to get around this problem.

 

Ask:

Anytime the list query is updated, set the "Group by" property to a particular column.

 

Issue:

I have set up a Client state parameter that is bound to the "Group by" field which works on page load but anytime I go on to update the list filter query on the list via an event (such as clicking a data visualisation) it does not work.

 

Can anyone point me in the right direction?

4 REPLIES 4

Nootan Bhat
Mega Sage

HI @Chris176 ,

List component has an event "Query updated". Use this field to update the client state parameter which holds the groupBy field value. Also please check if there is an event or client script which might be setting the client state parameter. Please check the event triggered from the data visualisation. 

Please accept the reply as solution if it was helpful.

 

Thanks 

Hi Nootan,

 

Thank you for the advice, but this does not work for me. It is as though the groupBy field no longer binds to the state when the query is updated. No script is updating the groupBy parameter either.

 

Any other ideas?

Thanks!

@Chris176, Share the screenshot of how you are biding the Client state & how it is used.

Kiera
Tera Expert

Appreciate this is an old thread but I was having this issue today and couldn't find a solution documented online:

 

It looks like the groupBy value on a list controller / component needs to be in the following format when bound dynamically: "GROUPBYcolumn_name" eg "GROUPBYname" (this is how its passed to the LIST_CTRL#DATA_FETCH_INITIATED event in the 'query' parameter)

 

So you need to make sure your client state parameter is in this format / is not just the field name.