Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • After saving go to programs and add a new program

    • Name your program, and set the program target filter to stackractive

    • Copy and paste the below code for the program into the main part (the filter for the tableFunc overviewTableFunc function can be modified to return the equip data you want. Look at the program section for more info.)

    • Top right of program editor, click the three dots, and select variables

    • Click the gear that appears as you hover over this

    • turn Invokes the Function on and change the dropdown to Custom Event

    • Type in obtainData in the line below and save

    Save and you're done!

...

Code Block
var template = this;
var target   = query('targetPoint');
var columns  = [];
finstack.eval('tableFuncoverviewTableFunc()').then(function(data) {
    var realPoints   = data.result.toObj();
    console.log(realPoints);
    template.columns = realPoints[0].data.columns;
    template.rows    = realPoints[0].data.rows;
});

By default, the tableFunc overviewTableFunc function on line 4 above will return all equips. To change this, you can add your own filter to query for certain equips. Examples below:

In our case, we have equips tagged as “equip and vav”. To filter those, it would be something like this for line 4, where the filter is inside the tableFuncoverviewTableFunc() as a string:

Code Block
finstack.eval('tableFuncoverviewTableFunc("equip and vav")').then(function(data) {

...

Code Block
finstack.eval('tableFuncoverviewTableFunc("equip and vav and floorRef->dis==\\\"1st Floor\\\"")').then(function(data) {

...