cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Maurice
Frequent Visitor

Put multible text into a textfiled if checkbox is activated

Hello together,

 

I'd like to set the value of a textbox to a certain text if a checkbox is activated. It should also be possible to do that with multible texts, so these single texts are inserted one after another. For examle: 

 

Checkbox1 = value: The text "Test" gets inserted into Label1

Checkbox2 = value: The text "_Test2" gets inserted into the Label1 right after the test "Test" --> "Test_Test2"

 

How would the syntax be constructed?

 

Thanks,

Maurice

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi @MauriceThere are several ways to do that. The simpliest I though of is just having two check boxes and one text label:
step1.png

In the Label1 Text property enter a function like this:

"Text" & If(Checkbox1.Value," Checked 1","") & If(Checkbox2.Value," Checked 2","")

The If statement would check if the checkbox is seleted and if it is output some text.

 

step2.png

 

Running the app you get the following results:

Both checkboxes selected:

step3.png

None of the boxes selected:

step4.png

One of the box is selected:

step5.png

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @MauriceThere are several ways to do that. The simpliest I though of is just having two check boxes and one text label:
step1.png

In the Label1 Text property enter a function like this:

"Text" & If(Checkbox1.Value," Checked 1","") & If(Checkbox2.Value," Checked 2","")

The If statement would check if the checkbox is seleted and if it is output some text.

 

step2.png

 

Running the app you get the following results:

Both checkboxes selected:

step3.png

None of the boxes selected:

step4.png

One of the box is selected:

step5.png

View solution in original post

Hi @Anonymous,

 

Your solution works!

 

Thanks,

Maurice

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,230)