cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Kudo Kingpin
Kudo Kingpin

Text Input visibility

Hi there, 

Quick question here?

I have a text input with a visible value based on a condition. This text input is for a "comments" so the input could be several characters or just a few. 

 

I would like to add a button that shows something like Add/Hide the comments input control but respecting the first condition:

 

The text input visible = If(LblSelectable.text = "false", false, true)

 

Thanks in advance for any help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
BrianS
Super User
Super User

You could add a toggle - tgl_ShowHide - then in your text input trueVisible: tgl_ShowHide And LblSelectable.text="true", 

View solution in original post

7 REPLIES 7
BrianS
Super User
Super User

You could add a toggle - tgl_ShowHide - then in your text input trueVisible: tgl_ShowHide And LblSelectable.text="true", 

View solution in original post

eka24
Super User III
Super User III

Change If(LblSelectable.text = "false", false, true) to LblSelectable.Visible

Else, Explain "The text input visible = If(LblSelectable.text = "false", false, true)" further. 

Does LblSelectable contain "false"

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

sajarac
Kudo Kingpin
Kudo Kingpin

Hi,

 

Thanks for the prompt response. The LblSelectable contain "false" Depends on the item selected I need to show or hide the text input for the comments. But because I don't have room/space for that input that is why I need to show/hide based in a toggle or checkbox or button.

 

 

eka24
Super User III
Super User III

Check the reply by @BrianS 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @BrianS , for some reason I couldn't get this to work. This is what I have:

 

I have added a toggle = tgl_ShowHide

 

My text input visible = If(tgl_ShowHide.Value = true And LblSelectable.Text = "false", false, true)

 

sajarac_0-1620310881507.png

sajarac_1-1620310901262.png

 

BrianS
Super User
Super User

The formula I gave:   tgl_ShowHide And LblSelectable.text="true"

would make the field visible if the Label was "true" and the toggle was "on", any other set of conditions will be false.

It looks like you have the true and false for the 2 controls mixed.

BTW - you don't need the If because the property is just looking for something that evaluates to true or false, since the toggle control returns a true or false, that's all you need.

Am I missing something?

 

sajarac
Kudo Kingpin
Kudo Kingpin

You are absolutely correct!

sorry for the confusion. Is all good now.

 

Thanks a Million!

 

🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,572)