Service Portal - Checkbox display values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 02:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 02:21 AM
Hi Rody,
Please add below code in your client script for widget.
var fields= $scope.data.fields;
for(var n in fields){
if(fields[n].type=='boolean'){
if(fields[n].display_value=='false'){
fields[n].display_value="No";
}
else{
fields[n].display_value="Yes";
}
}
}
Please mark the response correct/helpful based on the impact.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2017 02:22 AM
Hi Rody
<div ng-if="variable_toggle">
<div class="m-b break-word" ng-repeat="variable in data.variables">
<div ng-if="variable.name != 'patient' && variable.name != 'rm_return_value'">
<label class="m-n"><b>{{variable.label}}</b></label>
<div ng-if="variable.value != 'true' && variable.value != 'false'">
{{variable.display_value}}
</div>
<div ng-if="variable.value == 'true'">
Valgt
</div>
<div ng-if="variable.value == 'false'">
Fravalgt
</div>
</div>
</div>
</div>
It's line 8 to 13, where I check if the value is true/false and changes it.
Best regards,
Flemming