Dynamic Filtering in Gantt Chart for RITM and sctask Tables Using UI Builder

Mahesh_Kotte
Tera Contributor

Hello everyone,

We've generated a Gantt chart for the RITM (Requested Item) and sctask table using the Gantt chart component in UI Builder. We need the chart or records to be filtered based on the "assigned to" criteria. This means that whenever we apply a filter, the chart should update accordingly. Currently, we're using the lookup records data resource to retrieve data, but we want it to dynamically fetch records based on the user's filter.

Could someone please offer guidance on troubleshooting and resolving this issue?

Thank you!

 

@bradtiltonnow #uibuilder

4 REPLIES 4

Brian Fetterhof
Tera Contributor

Could you please share how you were able to create a Gantt chart for request items and sc tasks?

Mahesh_Kotte
Tera Contributor

@Brian Fetterhof 
To create a Gantt chart for request items and catalog tasks, we followed these steps:

  1. Data Retrieval: We created a data resource to look up records in the sctask table. This resource retrieves fields such as Number, Opened, Closed, Short Description, and associated Request Item details like Number, Opened, Closed, and Short Description.

  2. Client Script: We developed a client script to load the retrieved data into a JSON format schema required for the Gantt chart.

  3. Dynamic Filtering: To enable dynamic filtering, we implemented a condition builder. This builder updates the query and saves it in a client state parameter, ensuring that data retrieval from the data resource is adjusted according to the updated query.

@Mahesh_Kotte 

Hi, thank you for your insights. Could you possibly provide the code snippet for how the client script captures the retrieved data from the data resource and formats it into the Gantt chart? That would be very helpful.

Additionally, where did you create the client script? Was it under "Data and Scripts," and then linked to the data resource as an event mapping? Or did you attach a script directly to the Gantt component in the record list, replacing the data binding with a "use script" option instead?

A more detailed explanation would be greatly appreciated. Especially for the part about using a dynamic filter with the condition builder too. 🙂

I have the same requirement and am feeling a bit overwhelmed since there seems to be very little documentation available for this component.

 

Thank you so much for your help!

Guido Bernuetz
Giga Guru

My suggestion: Instead of using "look up records"
Define a own data broker (Type: Transform). This is a normal server side script. 

There you can do everything you need including the JSON transformation

GuidoBernuetz_0-1719246221771.png

 

I am not a helpful hunter.
I will always try to give a meaningful and valid answer.