cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
Impactful Individual
Impactful Individual

How to manage control visibility in Canvas App?

Hello,

 

There is a Textbox1 and listbox1 control on the screen and I need to manage followings:

 

  1. By default listbox1 should be visible false
  2. when user type in Textbox1, then only listbox1 should be displayed, else it should be visible false.
  3. when item is selected in the listbox1, listbox1 should be visible false.

 

Currently Listbox1.Visible = !IsBlank(Textbox1.Text) which only satisfies 1 and 2nd condition. How can achieve all above conditions to be executed?

 

Thanks,

3 REPLIES 3
mdevaney
Super User III
Super User III

@dave8 

Here's my proposed code:

!IsBlank(Textbox1.Text) And IsBlank(ListBox1.Selected.Value)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

eka24
Super User III
Super User III

In the visible of the listbox;

!IsBlank(Textbox1.Text) Or Listbox1.SelectedItems.Value= ""

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

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.

 

VijayTailor
Resident Rockstar
Resident Rockstar

Hi Dave,

 the below-mentioned requirement. you can implement like that.

1. By Default List is Hidden - Condition Expression is - if(IsBlank(TextBox ),false,true).

VijayTailor_0-1600691171674.png

2. if you need to Collect All Selected Value then you can use Button with Collection / On Select Event Collect into the Collection.
Like Below (Note - OnSelect Event You Need to Get Distinct Value if you Need to Save or Patch)

VijayTailor_1-1600691435063.png

VijayTailor_2-1600691489453.png

And again remove the text from Text Box.
The list is Hidden.

Please FInd the below Link for the Demo of the Test.
https://drive.google.com/file/d/1Zp-rGkIyFA9miEZYC_PR48REUh0jFfZf/view

 

 

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

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (27,687)