cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way of changing the output from a checkbox from true / false to yes / no

Sushi Chef
Sushi Chef

Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Our customers are getting confused by true / false on our Service Reports and have asked if the output documents can state yes / no, when a checkbox is either on or off.

Is there a way of changing this, or is this hard coded?

Message 1 of 13
1 Solution

Accepted Solutions
Employee
Employee

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

You can use IF function to achieve this. For example, {{$M.Work_Order.SVMXC__Customer_Down__c.label}}: {{$F.IF($D.Work_Order.SVMXC__Customer_Down__c, 'Yes','No')}}

Message 2 of 13
12 Replies
Employee
Employee

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

You can use IF function to achieve this. For example, {{$M.Work_Order.SVMXC__Customer_Down__c.label}}: {{$F.IF($D.Work_Order.SVMXC__Customer_Down__c, 'Yes','No')}}

Message 2 of 13
Sushi Chef
Sushi Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

I inserted the following code in the template:

Risk Assessment Performed :  {{$F.IF($D.Work_Order.AH_Risk_Assessment_Performed__c,'Yes','No')}}

This is displayed on the report:

Risk Assessment Performed :  {{$F.IF($D.Work_Order.AH_Risk_Assessment_Performed__c,'Yes','No')}}

When I change the code in the template to:

Risk Assessment Performed :  {{$D.Work_Order.AH_Risk_Assessment_Performed__c}}

This is displayed on the report:

Risk Assessment Performed :  true

Message 3 of 13
Employee
Employee

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

The IF function syntax for printing Yes/No for checkbox field values is correct; the result you see where the function is printed instead of function's return value can be because of formatting issues. Can you check the HTML source code by clicking the 'Source' button at the top left of the Template Designer in SFM Designer? You might be able to spot such issues.

Message 4 of 13
Grill Chef
Grill Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Hi Colin

I have created a number of checklist type outputs for our engineers on service visits and changed the standard " true / false" on checkbox fields to( '✓', '✗')

What you need to do is to create a custom formula field with an IF function ( e.g  IF(Check_clean_tank__c, '✓', '✗') then reference the field API name in your output document.

you just need to replace my ( '✓', '✗') with yes , no  or use anything you want.

hope this helps


Nat

Message 5 of 13
Sushi Chef
Sushi Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Being new to HTML I didn't realise that I had to edit this in the source. Having done so, it now works.

Message 6 of 13
Sushi Chef
Sushi Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Bit premature on saying this was an answer, it works with the browser but the iPad doesn't work, it says Yes to everything! Is there a setting I'm missing?

Message 7 of 13
Employee
Employee

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Colin Jolliffe​,

It appears that the function is not parsed correctly in iPad app. Please check if this alternative works for you in both browser and iPad app:

{{$F.IF($F.FORMAT("{0}",$D.Work_Order.SVMXC__Customer_Down__c) == "true", "Yes", "No")}}

Regards,

Meenakshi.

Message 8 of 13
Highlighted
Sushi Chef
Sushi Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

Meenakshi

I finally got a chance to try this and it works on the Service Report but not on a related list on a Summary Report.

So thanks for the first part, that's great but any idea why it doesn't work on the summary report. See below.

Formula yes no.bmp

Message 9 of 13
Sushi Chef
Sushi Chef

Re: Is there a way of changing the output from a checkbox from true / false to yes / no

Jump to solution

This is the HTML

<div class="part-details">

  <table border="0" cellpadding="1" cellspacing="0" width="100%">

  <thead>

  <tr>

  <th colspan="7">

  WORK ORDER SUMMARY</th>

  </tr>

  </thead>

  </table>

  <table border="0" cellpadding="1" cellspacing="0" svmx-data="{{$D.Work_Order}}" width="100%">

  <thead>

  <tr>

  <th class="theader" svmx-data="{{PRMS_Job_Number__c}}">

  Job Number</th>

  <th class="theader" svmx-data="{{$D.Work_Order.PRMS_Order_Description__c}}">

  Order Type</th>

  <th class="theader" svmx-data="{{SVMXC__Component__c.Name}}">

  Serial Number</th>

  <th class="theader" svmx-data="{{SVMXC__Component__c.SVMXC__Product_Name__c}}">

  Product</th>

  <th class="theader" svmx-data="{{$F.IF($F.FORMAT("{0}",$D.Work_Order.Product_Located__c) == "true", "Yes", "No"}}"> 

  Machine Located</th>

  <th class="theader" svmx-data="{{$D.Work_Order.Installed_Product_Latest_Location__c}}">

  Latest Location</th>

  <th class="theader" svmx-data="{{$F.IF($F.FORMAT("{0}",$D.Work_Order.Safe_to_Operate__c) == "true", "Yes", "No"}}">

  Safe to Operate</th>

  <th class="theader" svmx-data="{{$F.IF($F.FORMAT("{0}",$D.Work_Order.Quote_Required__c) == "true", "Yes", "No"}}">

  Quote Required</th>

  </tr>

  </thead>

Message 10 of 13