Outputting "Yes" and "no" responses to PDF

Hello,

So I have a number of fields set to Yes/No type and as a result, they write to the table as "TRUE" or "FALSE." In my PDF export automation, it outputs as a "Y" or "N." What I need is for it to display the actual words "Yes" or "No." I have tried changing the type to Enum and setting the values to "Yes" and "No" but it still seems to write to the table as TRUE or FALSE and does not display as I am hoping in the PDF. Any suggestions? 

**Bonus points if you can tell me how I could get it to shade these Yes or No outputs in the PDF in different colors based on whether it is a Yes or No response. ๐Ÿ™‚

Solved Solved
0 7 266
1 ACCEPTED SOLUTION

I think you had asked the query in the relevant tip as well. I am responding here in detail

Insert Colorful Status RYG Images in the Reports - Page 2 - Google Cloud Community

The data in the app record in the backend sheet looks like 

Suvrutt_Gurjar_2-1703915955678.png

 

As you can see[Recent-Customer], [Prime_Customer], [Online_Purchases] are Y/N type columns.

So the template can look like below to convert the "Y" "N" or 'TRUE", "FALSE" values to "Yes", "No"

Please note the [Prime_Customer_Status], [Recent_Customer_Status] and [Online_Purchases_Status] are three VCs that convert the status of Y/N columns [Prime_Customer], [Recent_Customer] and [Online_Purchases] into those status images as desired by you.

 

Suvrutt_Gurjar_0-1703915628657.png

The result PDF will look like below

Suvrutt_Gurjar_1-1703915679832.png

The expression for  VC [Prime_Customer_Status] can be something like 

CONCATENATE("https://placehold.jp/",SWITCH([Prime_Customer],"TRUE","228C22","FALSE","FFCC00","000000"),"/ffffff/150x150.png?text=",IFS([Prime_Customer], โ€œYesโ€, NOT([Prime_Customer]),โ€Noโ€))

You can similarly construct VCs and expressions for [Recent_Customer_Status] and [Online_Purchases_Status] columns.

Finally, please note as mentioned in the tip also, the images use an external service. So please evaluate the impacts at your end such as any security requirement or continuous availability of service etc.

 

 

 

 

View solution in original post

7 REPLIES 7

You can write an expression like

<<IFS([STATUS]="Y", "Yes", [STATUS]="N", "No")

in your template

I think you had asked the query in the relevant tip as well. I am responding here in detail

Insert Colorful Status RYG Images in the Reports - Page 2 - Google Cloud Community

The data in the app record in the backend sheet looks like 

Suvrutt_Gurjar_2-1703915955678.png

 

As you can see[Recent-Customer], [Prime_Customer], [Online_Purchases] are Y/N type columns.

So the template can look like below to convert the "Y" "N" or 'TRUE", "FALSE" values to "Yes", "No"

Please note the [Prime_Customer_Status], [Recent_Customer_Status] and [Online_Purchases_Status] are three VCs that convert the status of Y/N columns [Prime_Customer], [Recent_Customer] and [Online_Purchases] into those status images as desired by you.

 

Suvrutt_Gurjar_0-1703915628657.png

The result PDF will look like below

Suvrutt_Gurjar_1-1703915679832.png

The expression for  VC [Prime_Customer_Status] can be something like 

CONCATENATE("https://placehold.jp/",SWITCH([Prime_Customer],"TRUE","228C22","FALSE","FFCC00","000000"),"/ffffff/150x150.png?text=",IFS([Prime_Customer], โ€œYesโ€, NOT([Prime_Customer]),โ€Noโ€))

You can similarly construct VCs and expressions for [Recent_Customer_Status] and [Online_Purchases_Status] columns.

Finally, please note as mentioned in the tip also, the images use an external service. So please evaluate the impacts at your end such as any security requirement or continuous availability of service etc.

 

 

 

 

Thanks for this information. I am in the process of trying to get this to work and I am running into an error when trying to create the Virtual columns that will display the Yes or No responses with color backgrounds. This platform is telling me permissions denied when I tried to upload a screenshot of it but the error message is:

"SWITCH function is used incorrectly: Cannot convert input 2 of type 'Text' to 'List of Text'"

 
 

 

So now it appears to be accepting the formula, but it just displays like this in my PDF instead of displaying the actual image:

https://placehold.jp/228C22/ffffff/150x150.png?text=Yes

Scratch that! I realized I did not set up the Virtual column with the correct type. Now that it is "image" it works as intended. Thanks so much!

Is it possible to create a formula that can allow for more than just Yes or No as selections? So the IFS formula works for affirming the first choice and if not going with a second, but any way to modify that so I can have more selections?

Yes, please use SWITCH() or IFS() with more options. In fact IFS() and SWITCH() are good way to use for multiple condition/result options.

Top Labels in this Space