cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

TextField(Label) Visible If

Hi there, 

I am in a situation where i need a bit of help with the "If" statement in PowerApps. 

I essentially have a checkbox for every week day that the users can mark, and then click "Order", What i would like to do, is to make it possible for them to see only the weekdays they have marked off in the first screen on the last confirmation screen. 

Example: 
I check off Monday, Tuesday and Wednesday and move on. 
On the last page I would like the app to showcase labels saying, 
"You have chosen": Monday, Tuesday, Wednesday. 

Hope you understand my point, anyone know how to use the "If" statement in conjunction with the Visible attribute, or is it something completely different 🙂 

Thank You! 🙂 
- Tobi

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that you want the confirm screen only display the week day that you have chosen?

I've made a similar test for your reference:

1)Screen1:

seven check boxes, named checkbox1,checkbox2,checkbox3,checkbox4,checkbox5,checkbox6,checkbox7

Set checkbox1's Text: Monday

Set checkbox2's Text: Tuesday

Set checkbox3's Text:Wednesday

Set checkbox4's Text:Thursday

Set checkbox5's Text:Friday

Set checkbox6's Text: Saturday

Set checkbox7's Text:Sunday

2)Screen2:

insert a lable , set the label's Text:

"You have chosen:"& If(Checkbox1.Value,Checkbox1.Text&",","")& 
If(Checkbox2.Value,Checkbox2.Text&",","")&
If(Checkbox3.Value,Checkbox3.Text&",","")&
If(Checkbox4.Value,Checkbox4.Text&",","")&
If(Checkbox5.Value,Checkbox5.Text&",","")&
If(Checkbox6.Value,Checkbox6.Text&",","")&
If(Checkbox7.Value,Checkbox7.Text,"")

Since the sepeator "," may influence aesthetics, you could also try to use " " to replace it.

For example:  If(Checkbox1.Value,Checkbox1.Text&" ","")9121.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I'd put all of the days of the week ina collection, then use a gallery to put the checkboxes on the screen, adding them to a second collection called Selecteddays, you can then use Filter(source,Days in Selecteddays).

 

There is a similar idea in App in a day, also have a look at powerapps performance considerations by Mhedi.

v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that you want the confirm screen only display the week day that you have chosen?

I've made a similar test for your reference:

1)Screen1:

seven check boxes, named checkbox1,checkbox2,checkbox3,checkbox4,checkbox5,checkbox6,checkbox7

Set checkbox1's Text: Monday

Set checkbox2's Text: Tuesday

Set checkbox3's Text:Wednesday

Set checkbox4's Text:Thursday

Set checkbox5's Text:Friday

Set checkbox6's Text: Saturday

Set checkbox7's Text:Sunday

2)Screen2:

insert a lable , set the label's Text:

"You have chosen:"& If(Checkbox1.Value,Checkbox1.Text&",","")& 
If(Checkbox2.Value,Checkbox2.Text&",","")&
If(Checkbox3.Value,Checkbox3.Text&",","")&
If(Checkbox4.Value,Checkbox4.Text&",","")&
If(Checkbox5.Value,Checkbox5.Text&",","")&
If(Checkbox6.Value,Checkbox6.Text&",","")&
If(Checkbox7.Value,Checkbox7.Text,"")

Since the sepeator "," may influence aesthetics, you could also try to use " " to replace it.

For example:  If(Checkbox1.Value,Checkbox1.Text&" ","")9121.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Worked like a charm, thanks so much 🙂 
- Tobias 

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,144)