Skip navigation
All Places > PI Developers Club > Blog > 2019 > August


Hi everyone!


I had a request from my friend at Petronas about creating a Filter Table in PI Vision which can simulate the filtering ability of Microsoft Excel. As you probably already know, the stock Table symbol doesn't support filtering the rows of the table. This is where PI Vision Custom Symbol Extensibility will fill the gap!


In this blog, I will create a Filter Table which contains PI Point values that we can filter by the name of the PI Point and even do searching by PI Point name. Let's take a look at the implementation.



We start with the definition of the symbol. Note that we are using the 'Table' DataShape to allow for multiple data sources.



var definition = {
   typeName: 'filtertable',
   datasourceBehavior: CS.Extensibility.Enums.DatasourceBehaviors.Multiple,
   visObjectType: symbolVis,
   getDefaultConfig: function () {
      return {
         DataShape: 'Table',
         Height: 500,
         Width: 600


Next, the dataUpdate function will be used for the creation of the table and also its update. The DataTable jQuery plug-in will be used to help with the table construction.



q = 1;
var table;
function dataUpdate(data) {
   if (q) {
         data: data.Rows,
         columns: [
            { "data": "Label" },
            { "data": "Time" },
            { "data": "Value" }
         rowId: 'Label'
      q = null;
      table = $('#example').DataTable();
      var select = $('<select />')
         .on('change', function () {
         .each(function (d) {
            select.append($('<option value="' + d + '">' + d + '</option>'));
         select.append($('<option value="">' + 'ALL' + '</option>'));

   table = $('#example').DataTable();
   i = 0;
   table.rows().every(function () {
      var d =;
      d.Value = data.Rows[i].Value
      d.Time = data.Rows[i].Time




Finally, in your html file, you can define the column header names that you want.



<table id="example" class="display" style="width:90%">


Here is an example of how it will look like.


Filter Blog

By date: By tag: