cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Show/hide a component with a button

Hi !

 

I'm trying to do something like this:

- A screen is loaded with a datatable invisible;

- The user fill a textinput with something he wants to see;

- When clicking a button, the datatable will show and filter that textinput term digited.

 

I'm trying first just to make a button that shows that table, so, i let the datatable visible option in off:

image.png

 

and in the button onselect, i tried:

 

image.png

 

But, when i run the application and click on the button, nothing happens. The table doesn't show up. 

Any help?

 

 

Thank you ! 

 

20 REPLIES 20

Is configured this way:

kjekdjke.png

Sorry. I thought you mentioned that "Items" is not available. 

Let's try to fix the second problem then. Please assign the following formula to your Button.OnSelect property:

Set(col, Filter(capacitacoes_dados_teste, pesquisa.Text in colaborador))

And then set the DataTable control Items property to "col" (with no quotes).

 

No problems !!!

 

I did as you said:

 

hejehu.jpg

 

The debbuger returns that expected a text value on "colaborador".

 

Good. What is the "colaborador" column type in your source? Also, what kind of source is that (SharePoint, SQL or else)?

It's a share point List. The items are single line texts.

Sorry for focusing on that, but when you say "single line texts", do you mean that the the "colaborador" column is of type "Text" in SharePoint?

The reason I'm asking is because you should be able to use your formula on the text field. I just tried that on my test list and cannot reproduce this issue. The first screenshot below is from my SharePoint list and the second one is from the PowerApps.Capture1.PNG

 

Capture2.PNG

 I do get a delegation warning (because the "in" is not a delegable operator in SharePoint) but I do not get the error that you see.

Can you please confirm the types?

 

 

Hi ! 

Because of any reason i don't know, i couldn't check the column "colaborador" type. So i added a mirror of this column, called "colaborador_1". When i try to filter this column, i get this error:

 

eheuhy.jpg

If you added a new column, you will have to either:

1. Refresh your data source in PowerApps (right click on the "..." menu from View/Data Sources/Data/capacitacoes_dados_teste and select "Refresh")

2. Remove the current capacitacoes_dados_teste source and add it again.

I did that and didn't work.

 

Some tip about the last error i reported?

 

That error does not indicate any specific reasons. Please try the following:

1. Create a brand new test application

2. Add your SharePoint "capacitacoes_dados_teste" list

3. Add a button control, text input control and a data table control

4. Apply the suggested formulas.

This configuration is pretty simple and must work. This will indicate if the issue is with your previous application or with your SharePoint list.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,225)