I would like to show/hide different sections of my app. I currently have when I select the plus icon of electrical it will expand to show a form and hide the other sections. I cannot get it to work for the other sections like "mechanical", "pneumatic" and so on. Can you please help?
What do you mean by naming them when you create boolean variables? I'm very new to this and not sure where to do that.
I'm not understanding your example.
Hi @EMA03356 ,
You can distinguish the variables of each text by naming them when creating Boolean variables. Then place the variable on the visible property of the text.
For example, when the user clicks on the "electrical" button and text 1 and text 2 are displayed, then they should use same variable.
Best regards,
Rimmon
Do I need to set the variable on the text somehow? How will it know which text is which variable?
Hi @EMA03356 ,
Yes, this way may solve your query,
Write code in Plus icon of electrical.
Set(varTab1, true);
Set(varTab2, false);
Set(varTab3, false);
Set(varTab4, false);
Write code in Plus icon of Mechanical.
Set(varTab1, false);
Set(varTab2, true);
Set(varTab3, false);
Set(varTab4, false);
Follow the same logic for other control.
Hope this helps.
If my answer helps you solve the problem, please accept it as a solution.
If you have another question, please post it in new post.
Thanks
Hi @EMA03356 ,
It seems that I misunderstood the requirement.
If you want use variable to show/hide text on your screen, I recommend you set variables for each text label, when user selects the plus icon of electrical, set other variables to false.
Set(var2,false);
Set(var3,false);
Set(var4,false);
______________________________________________________________________________________________________________________
If my answer helps you solve the problem, please accept it as a solution.
If you have another question, please post it in new post.😀
Best regards,
Rimmon
I'm sorry, I'm not following this. I just need to show/hide text that is on my screen when selecting icon.
Can you help me with the show / hide variables? I'm not sure how to do this. I got it to work with just one variable to do the first section, but not the others.
Hi @EMA03356 ,
What is the structure of the Screen?
If they are in a Gallery, I'm afraid you need to create a new Yes/No column for recording which item is selected.
When user select 'Add' button, update true to new column.
OnSelect of 'Add' button.
Patch(DataSource,LookUp(DataSource,ID=ThisItem.ID),{NewColumn:true});//Show Form when people select button firstly.
Patch(DataSource,LookUp(DataSource,ID=ThisItem.ID),{NewColumn:false})//Hide Form when people select button secondly.
Items of Gallery.
Filter(DataSource,true||NewColumn=true)
If the Form is inside Gallery, please refer to this.
Item of Form.
ThisItem
Visible of Form.
ThisItem.NewColumn
If the Form is outside Gallery, please refer to this.
Item of Form.
Gallery.Selected
Visible of Form.
!IsBlank(Filter(DataSource,NewColumn=true))
If the Form is inside Gallery, please refer to this.
!IsBlank(Filter(DataSource,NewColumn=true))
Best regards,
Rimmon
Yes, that's possible. I believe, at the given point of time, always only one section will be shown and other sections will be hidden correct. If so, you can use show / hide variables to manage it.
Let me know, if you need any help on this.
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional