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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Variables for Checkbox...
Power Apps
Answered

Variables for Checkboxes and Power Automate

(0) ShareShare
ReportReport
Posted on by 71

Hi,

 

I have a Word document that i use as a template and then to populate it. Now i got it to work, to use Checkboxes to mark specific marked places in the Word document as "x" (Like a checkmark, because directly checkboxes wont work as far as i know and i dont have a encodian license unfortunately)

 

The flow has text inputs that then populate a word document and create a file in sharepoint.

 

For every Checkbox I'm using (For the second Checkbox, i use the var CheckBoxValue2 for example):

OnCheck: Set(CheckBoxValue, "x")

OnUncheck: Set(CheckBoxValue, "")

Default: If (CheckBoxValue = "x", true, false)

 

And I have a Button to run the Flow on OnSelect:

TestforFileCreation.Run({

                            text: If(CheckBoxValue = "x", "x", ""),
                            text_1: If(CheckBoxValue1 = "x", "x", ""),
                            text_9: TextInput1.Text
                        })

 

For every Checkbox i need a new variable like CheckBoxValue1, CheckBoxValue2, CheckBoxValue3 and so on... and there a lot of Check boxes so wouldn't it be kind of unconventional to do this? Also i would need to put in every variable in the OnSelect section on the button. Is there any better solution for this instead of creating hundreds of variables?

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @utkua ,

     

    Instead of using variables, you can just reference the value of the check boxes themselves:

    TestforFileCreation.Run({
    
     text: If(CheckBox1.Value, "x", ""),
     text_1: If(CheckBox2.Value, "x", ""),
     text_9: TextInput1.Text
     })
  • utkua Profile Picture
    71 on at

    Thank you, but isn't a checkbox normally seen as a boolean? I tried to use on the OnCheck and OnUncheck property "Set("x")" but that wont work.

     

    Edit: Nevermind i wrote it wrong, thanks a lot for this solution!

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @utkua ,

     

    Indeed the value of a checkbox is a boolean, which is why you can use it directly as a condition (first argument) in the If function.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard