Skip to main content

Hi,


I have a table with a multi-select option filter, there is a chart linked to the table which dynamically updates when the filter is activated.


I have been asked if we can display the values selected in the multi-select option filter in a chart title. Has anyone tried doing this?


Thanks


Damien


Damien,

Here is a snippet that demonstrates how to add to the chart title.  Create the snippet and set it to run before rendering the chart (click on the chart, find the Advanced tab in the properties area, and select the snippet in the Before Render Snippet option).  You will need to adjust the model and the name of the condition.

Thanks,

Bill


var params = argumentsn0],<br>$ = skuid.$;<br>var model=skuid.model.map().Opportunity;<br>console.log('model');<br>console.log(model);<br>var con=model.getConditionByName('__autofilter__StageName');<br>console.log(con);<br>var val = con.values;<br>console.log(val);<br>if (val !==undefined) {<br>&nbsp; &nbsp; var display ='';<br>&nbsp; &nbsp; for (var i=0; i &lt; val.length; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; display += valvi];<br>&nbsp; &nbsp; &nbsp; &nbsp; if(i!==(val.length -1)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display += ', ';<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>}<br>console.log('display');<br>console.log(display);<br>params.title.text = params.title.text + ': ' + display;<br>&nbsp; &nbsp;&nbsp;<br>}



Thanks Bill, that works perfectly!

Have you tried this with multiple picklists? 

Thanks 

Damien


Damien,

It does work with multi-select filters.  I am not sure about multi-select pick list fields.

Thanks,

Bill


Thanks Bill, really appreciate your help.

Thanks 

Damien