Having a check mark added to the pdf when I select Yes in a yes/no column

CS2
Bronze 4
Bronze 4

I have been able to do this with an If/ end if statement in the template and an image of the checkmark.  What I would like to know if there is a better way.  It is so cumbersomer to do this in a template and formatting it without testing each section.  I have attached an example of one I am working on converting to appsheet.  Currently it is paper copy filled in.  Site Inspection checklist . 

Solved Solved
0 5 110
1 ACCEPTED SOLUTION

Could you post a screenshot of the checklist? community members may not open the  links at times. Even I did not open it.

Anyway, based on your description, you could also try to use the symbols available in Word and Google docs

Search in word as follows under Symbol option

Suvrutt_Gurjar_0-1745599730176.png

 

Google docs, you will have those under "Insert/Special Characters" option.

Suvrutt_Gurjar_1-1745599847190.png

 

You could simply copy paste those into an enum field as follows

Suvrutt_Gurjar_2-1745599926359.png

 

In the form, the enum button will look like follows

Suvrutt_Gurjar_3-1745599987087.png

In the detail view the selection will look like below

Suvrutt_Gurjar_4-1745600036882.png

In the PDF report it will look like below. The example below show "N" selection. 

Suvrutt_Gurjar_5-1745600098944.png

 

Yet another option is to use emoji's For example in Google Docs, you will get it as follows

Suvrutt_Gurjar_6-1745600272984.png

 

in form it will look like below

Suvrutt_Gurjar_7-1745600419688.png

In detail view, after selection, it will look like below

Suvrutt_Gurjar_8-1745600458401.png

Finally in the PDF report , it will look like below

Suvrutt_Gurjar_9-1745600517950.png

 

 

 

 

 

 

View solution in original post

5 REPLIES 5

Using an HTML template can simplify the code a little bit.

I asked GEMINI and got this reply, applied it and it seems to work well.

1. Using CSS content property with generated content (requires a way to represent the true/false state):

If you can represent the true/false state using a CSS-targetable mechanism (like a data attribute or a specific class), you can use the content property with pseudo-elements (::before or ::after) to insert images.

HTML

<div class="status" data-value="true"></div>
<div class="status" data-value="false"></div>

<style>
.status::before {
  content: ''; /* Required for pseudo-elements */
  display: inline-block; /* To control width and height */
  width: 20px;
  height: 20px;
  background-size: cover;
}

.status[data-value="true"]::before {
  background-image: url('true-icon.png');
}

.status[data-value="false"]::before {
  background-image: url('false-icon.png');
}

/* Optionally hide the original text if it exists */
.status {
  font-size: 0; /* Or use other techniques to hide text */
}
</style>
In this example:

We use a data-value attribute to store the "true" or "false" state.
The ::before pseudo-element is used to insert the image.
Attribute selectors ([data-value="true"], [data-value="false"]) target elements with specific data attribute values.
The content: '' is necessary for the pseudo-element to be generated.
background-image is used to set the image.
We might need to hide the original text content of the div if it's present.

This is the template I tested.

Fields YN1 and YN2 are of interest to you. 

<p class="status" data-value="&lt;&lt;[YN1]&gt;&gt;"></p>

<html>
  <head>
    <style>
        .status::before {
          content: ''; /* Required for pseudo-elements */
          display: inline-block; /* To control width and height */
          width: 20px;
          height: 20px;
          background-size: cover;
        }
        
        .status[data-value="Y"]::before {
          background-image: url('https://cdn-icons-png.flaticon.com/128/2618/2618312.png');
        }
        
        .status[data-value="N"]::before {
          background-image: url('https://cdn-icons-png.flaticon.com/128/61/61221.png');
        }
        
        /* Optionally hide the original text if it exists */
        .status {
          font-size: 0; /* Or use other techniques to hide text */
        }
        </style>
  </head>

  <body>
    <h1>New step Task - 5</h1>
    <h2>tb w sp</h2>
    <p>id: &lt;&lt;[id]&gt;&gt;</p>
    <p>a: &lt;&lt;[a]&gt;&gt;</p>
    <p>b: &lt;&lt;[b]&gt;&gt;</p>
    <p>enuml_test: &lt;&lt;[enuml_test]&gt;&gt;</p>
    <p>YN1: &lt;&lt;[YN1]&gt;&gt; <p class="status" data-value="&lt;&lt;[YN1]&gt;&gt;"></p> </p>
    <p>YN2: &lt;&lt;[YN2]&gt;&gt; <p class="status" data-value="&lt;&lt;[YN2]&gt;&gt;"></p> </p>
    <p>SORT COLUMN: &lt;&lt;[SORT COLUMN]&gt;&gt;</p>  
    <br /><br />
  </body>
</html>

 This is the result PDF.

TeeSee1_0-1745586905707.png

Test row used

TeeSee1_1-1745587003397.png

 

 

Thank you.  I will take a  look at this .  I'm not strong on coding but I thinkl I can figure this out enough to test it.

 

Could you post a screenshot of the checklist? community members may not open the  links at times. Even I did not open it.

Anyway, based on your description, you could also try to use the symbols available in Word and Google docs

Search in word as follows under Symbol option

Suvrutt_Gurjar_0-1745599730176.png

 

Google docs, you will have those under "Insert/Special Characters" option.

Suvrutt_Gurjar_1-1745599847190.png

 

You could simply copy paste those into an enum field as follows

Suvrutt_Gurjar_2-1745599926359.png

 

In the form, the enum button will look like follows

Suvrutt_Gurjar_3-1745599987087.png

In the detail view the selection will look like below

Suvrutt_Gurjar_4-1745600036882.png

In the PDF report it will look like below. The example below show "N" selection. 

Suvrutt_Gurjar_5-1745600098944.png

 

Yet another option is to use emoji's For example in Google Docs, you will get it as follows

Suvrutt_Gurjar_6-1745600272984.png

 

in form it will look like below

Suvrutt_Gurjar_7-1745600419688.png

In detail view, after selection, it will look like below

Suvrutt_Gurjar_8-1745600458401.png

Finally in the PDF report , it will look like below

Suvrutt_Gurjar_9-1745600517950.png

 

 

 

 

 

 

CS2
Bronze 4
Bronze 4

 For a non coder, like me, this makes sense.  

CS2
Bronze 4
Bronze 4

I appreciate the input from everyone.  I am not a programmer so this is my goto for assistance and I am learnign so much from all the responses.