I want to return YES or NO checkbox type variables on the catalog form instead of true or false ?

Shantharao
Kilo Sage

Hello All,

 

I am using Multi Row Variable set in my catalog form, it contains one check box type variable, if I checked the check box I want to return YES instead of true, if I dint check it will return "NO" instead of false.

Please find the screen shot for your reference

find_real_file.png

 

I have checked the "Whether Customer Paid"  check box and it returns the value as true in the below snap shot but I want to make it as YES, How can I achieve this scenario by using client scripts

 

find_real_file.png

5 REPLIES 5

Mark Roethof
Tera Patron

Hi there,

What you are asking, will not be available for a checkbox variable. The outcome will always be true or false.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Nirosha Uddandi
Kilo Guru

I guess from back end it wont possible,in portal view we can achieve this

I want to achieve this scenario in portal only, please help me on this issue

after submitting request we will be getting all the details on the right side pane right.?

there only we can change the value from true to yes from widget html

if at all if your code look something like this

<div ng-if="variable.visible_summary">
<label class="m-n">{{variable.label}}</label>

<div>{{variable.display_value}}</div>

then change it as 

<div ng-if="variable.visible_summary">
<label class="m-n">{{variable.label}}</label>
<div ng-if="variable.value != 'true' && variable.value != 'false'">{{variable.display_value}}</div>
<div ng-if="variable.value == 'true'">Yes</div>
<div ng-if="variable.value == 'false'">No</div>
</div>