I'm looking to create a custom map object based on one of the existing tables. To provide context I have all of my devices inside subgroups (Organisation) inside groups (Country) inside a top level group. What I would like is a table that contains only the Country level groups and how many sensors in the various states, i.e. up, down, unusual.

I've managed to create something that achieves nearly this functionality by copying one of the existing data table map objects however it results in listing not only the Country groups but the Organisation groups. Is there a way to force the table to only include the first level of groups and not the subgroups?

The code I came up with is below: -

<!--Data Tables: Grouped Sensors-->

<div class="map_object map_table" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="overflow:auto;<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">">
  <#mapobject type="objectgrip" mode="<@editmode>">
  <#mapobject type="htmlbefore" subid="<@subid>">
  <#checkobjecttype objecttype="probenode,group,device" nicemessage="true" id="<@objectid>">
  
  <div class="maptablecontainer" style="overflow:hidden">
    <#table tableid="grouptable"
    id="<@objectid>"
    content="groups"
    columns="group,upsens,downsens"
    sortby="group"
    infoheader="false"
    links="false"
    sortable="false"
    varexpand="tabletitle"
    tabletitle="@objname" 
    filter_tags="@tag(<@tagfilterstring>)"
    filter_status="3"
    >
  </div>
  <#mapobject type="htmlafter" subid="<@subid>">
</div>

Article Comments

Hi Sean,

Unfortunately, there is no "level" property to set the level of the group view. So the main group and subgroups will be displayed.

Best regards.


Mar, 2017 - Permalink

That's a shame but good to know that I wasn't missing something obvious! Is there a way to achieve something similar?

Regards, Sean.


Mar, 2017 - Permalink

Hi Sean,

I wish there would be one, but I am afraid that there is no other way to achieve that. Sorry. :(


Mar, 2017 - Permalink