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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (16,926)