web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Converting the value o...
Power Apps
Answered

Converting the value of a toggle control to output Yes/No in HTML (PDF)

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am generating a PDF from PowerApps using the HTML control.  The PDF works perfectly but I've got an issue with the Toggle Controls value.  I've changed the FalseText and TrueText in the control to say Yes/No but when I get the value in the HTML the output is true/false.

 

My HTML looks like this:

 

<p class='fonts'><strong>Activities or workers requiring supervision eg. young 
workers, visitors etc.</strong></p>
<table style='width: 100%' class='fonts'>
	<tr>
		<td style='width: 25%'><strong>Risk Present?</strong></td>
		<td> " & tog_new_safetyplan_canvas_activities.Value & "</td>
	</tr>
	<tr>
		<td style='width: 25%'><strong>Controls:</strong></td>
		<td>" & inp_edit_safetyplan_canvas_activities_controls & "</td>
	</tr>
</table>

 

This results in this:

 

toggle.jpg

 

Is there a way to convert the true/false to Yes/No or do I have to something extra in the HTML?

 

Thanks in advance

Rob

 

Categories:
I have the same question (0)
  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    Hello @Rob_CTL ,

     

    The "Value" property of the toggle is a boolean, while the "TrueText" and "FalseText" are merely the visual label appearing next to the toggle depending on its value.

     

    If you want to get the texts, you can try something like this:

     

    If(
     tog_new_safetyplan_canvas_activities.Value,
     tog_new_safetyplan_canvas_activities.TrueText,
     tog_new_safetyplan_canvas_activities.FalseText
    )
  • Rob_CTL Profile Picture
    on at

    @WiZey perfect, thanks! 👍 👍

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard