Hi George,
please refer below comments if it help !
ng-repeat is older way to iterate over a list and we cannot do this in 18.2 .
so in 18.2 we are adding a column component whenever we add column element in template designer while creating templates.
As you can refer ur shared ParcelLayers.ts, there are 124 column component has been added in template(ParcelLayers.html), see below
<pb-info-column [columnConfig]="Row_IDConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding"> </pb-info-column>
<pb-info-column [columnConfig]="LotplanConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding"> </pb-info-column>
<pb-info-column [columnConfig]="Prop_NoConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding"> </pb-info-column>
etc..
so instead of modifying at each 124 places in template(ParcelLayers.html) we can update at single single place in file
column.component.ts
under location
ur_installed_ssa_dir\customerconfigurations\analyst\theme\templatecomponents
find
if(this.hide){if(this.hide){ this.elementRef.nativeElement.remove(); }
replace with
if(this.hide || this.value ==='F'){ this.elementRef.nativeElement.remove(); }
it will work for all the columns in your template and please do remember it will also affect all other templates as well and will remove column component whenever we have value 'F'.
How to get column name in custom template please refer your shared ParcelLayers.ts,there are 124 objects has been added for each column in ParcelLayers.ts
example
readonly Acid_HighConfig = {
"name": "Acid_High", // column name so u can get column name by doing Acid_HighConfig.name
"type": "String",
"selected": true,
"elementType": "Column",
"showLabel": true,
"showIcon": false,
"labelPosition": "inline"
};
similarly we have other column object config in ParcelLayers.ts
e.g
ur_column_name=
TZICBPConfig.name
or
ur_column_name =
EGES_100Config.name
Thanks------------------------------
Juned Ahmad
Knowledge Community Shared Account
Shelton CT
------------------------------
Original Message:
Sent: 06-08-2020 15:30
From: Juned Ahmad
Subject: Convert v12 Infotemplate to v2018 and then v2019
Hi George,
There is no any option in template designer to exclude column that have value 'F' howver we can exclude all column that have null or blank value via template designer as William already suggested
but yes we can achieve this via template edit outside TD in notepad or any editor.
Please refer below suggesstion
- <pb-info-column *ngIf="data.feature[Row_IDConfig.name].value !=='F'" [columnConfig]="Row_IDConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding"></pb-info-column>
and i hope anchor tag will also work if you do something as mention below in 18.2 templates
2.<b><a [href]="'http://globe.information.qld.gov.au/cgi-bin/SmartMapgen.py?q='+ data.feature.Lot_num.value" target="new">Open SMIS Map</a></b>
Please let me know if this solve the purpose.
Thanks
------------------------------
Juned Ahmad
Knowledge Community Shared Account
Shelton CT
Original Message:
Sent: 05-28-2020 17:34
From: George Corea
Subject: Convert v12 Infotemplate to v2018 and then v2019
Thanks Will - the issue is that the field is not null -it has a 'F' in it. I can replace all the 'F' values with null in the .tab file but there should be a way of dealing with this in code.
The key is in changing
<div ng-repeat="columnname in notSorted(feature.featureAttributes) | filter : '!stratusid'" ng-if="feature[columnname].value != '' && feature[columnname].value != 'F'";>
In the 2018/19 versions of SSA feature.
becomes data.feature.
But there must be a difference in the way the columns are called as now as in the html it's
<pb-info-column [columnConfig]="Row_IDConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding">
</pb-info-column>
As per https://docs.angularjs.org/api/ng/directive/ngRepeat the ng-repeat needs whatever columnname
is now called.
------------------------------
George Corea
Mangoesmapping
Original Message:
Sent: 05-24-2020 17:56
From: William Dean
Subject: Convert v12 Infotemplate to v2018 and then v2019
Hi George,
There is a checkbox in Template Designer to hide fields with NULL Values, it adds this component "isHideNull": true against each attribute listed in the TS & JSON files.
You can probably tackle this with Notepad++ and a careful Find&Replace.
Cheers,
Will
------------------------------
William Dean
Cairns Regional Council
Original Message:
Sent: 05-20-2020 04:52
From: George Corea
Subject: Convert v12 Infotemplate to v2018 and then v2019
I had a infotemplate in v12 that used to filter the columns to display and didn't show any that had a value of 'F'. How can I do the same in v2018?
in v12
<!--//use below for custom template impln-->
<!--<ul data-ng-repeat="(key, prop) in feature.allOthers">
<li ng-show="key.toUpperCase() !== 'STRATUSID'"><strong>{{key}}</strong>: {{prop}}</li>
</ul>-->
<!-- Display all the columns except the key column MI_PRINX --><ul>
<div ng-repeat="columnname in notSorted(feature.featureAttributes) | filter : '!stratusid'" ng-if="feature[columnname].value != '' && feature[columnname].value != 'F'";>
<strong>{{feature[columnname].name}}: </strong><span>{{feature[columnname].value}}</span>
</div>
I have attached the infotemplate that is created in v2018 as in the past I have been able to change the .html created in v2018 to what used in v12 by doing the following
so if I had the following in v12
<b><a href="http://globe.information.qld.gov.au/cgi-bin/SmartMapgen.py?q={{feature.Lot_num.value}}\{{feature.Plan_num.value}}" target="_blank">Open SMIS Map</b>
In v2018 I changed this to
<b><a href="http://globe.information.qld.gov.au/cgi-bin/SmartMapgen.py?q={{data.feature.Lot_num.value}}" target="_blank">Open SMIS Map</a></b>
so... {feature} becomes {data.feature} but this didn't work.
As there are a lot of fields I don't want to have to specify each column .
Template_Planning_Layer_Summary_v12.html is the version that used to work
ParcelLayers.* - are the files just created in v2018 and shows all the column names.
------------------------------
George Corea
Mangoesmapping
------------------------------