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
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.

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (93,787)