Spectrum Spatial (SSA/LIM)

Welcome to the Spectrum Spatial (SSA/LIM) community - start a discussion in the discussion tab or join in a conversation.

SSA Documentation  LIM Documentation  SSA Ideas  LIM Ideas

Discussions

Members

Resources

Events

 View Only
  • 1.  Modifying CalloutTemplates - Hiding Empty Fields / Fields with Specific Value

    Posted 10-11-2017 05:56
      |   view attached

    ?Currently our planning department has a summary layer that lists all the layers affecting a particular land parcel. For any given parcel there maybe between 5-10 fields that are needed to be displayed, however the remaining 80+ fields will still display in the summary with an 'F' value, making it rather unwieldy . Would like to modify the css/html to tidy up this to display only the fields with a 'T'. Image shows a subset of the output as it currently displays.

     

    See Attachment

     

    I gather the Display:None is the right request but unsure how to call that only when 'F' or Null values are present. Appreciate any help poitning me in the right direction.



  • 2.  RE: Modifying CalloutTemplates - Hiding Empty Fields / Fields with Specific Value

    Employee
    Posted 10-12-2017 00:45

    Hi William

    SSA allows an administrator to assign a custom html template to individual layers within a map config. Here is a link to the documentation http://support.pb.com/help/analyst/12.0/admin_guide/en/index.html#appendix/appendixD.html.

    These templates are based off the angularjs library so you can write logic directly into the templates!

    You should be able to filter individual fields with the following snippet (replacing No_Zone with the applicable column name):

     

    <div ng-if="feature.No_Zone.value == 'T'">

     <strong>{{feature.No_Zone.name}}: </strong>

    <span>{{feature.No_Zone.value}}</span>

    </div>

     

    Or since your are always looking for the value 'T' you can do all 80 fields at once using this snippet:

     

    <div ng-repeat="columnname in notSorted(feature.featureAttributes) | filter : '!stratusid'" ng-if="feature[columnname].value == 'T'">

     <strong>{{feature[columnname].name}}: </strong><span>{{feature[columnname].value}}</span>

    </div>

     

    The documentation for the angularjs directives I used can be found here https://docs.angularjs.org/api/ng/directive/ngIf and https://docs.angularjs.org/api/ng/directive/ngRepeat

     



  • 3.  RE: Modifying CalloutTemplates - Hiding Empty Fields / Fields with Specific Value

    Posted 10-12-2017 01:58

    ?Thankyou Mitchell that worked great. I didn't realise how straightforward it was to add logic to the templates. This has got me thinking of other possibilities.

    Small note, I had other fields that contained longer strings that needed to be displayed and some that contained null values that needed not be displayed so I modified the logic to 'not equal 'F' or null' for better filtering. Thanks for setting me off.