cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

How to write my variable name in set function in button onselect property as I don't know where to find variable name?

hi,

I am creating one Powerapp and I'm new here.

I have three button as tab which will open a different screen if I click on it but I don't understand what will be my variable name.

 

I see in every post related to tab button, everyone is using VarFormTab but what will replace this VarFormTab in my app?

Here I have attached image of my form and button but not able to variable name for my button to set variable function.

 

I want to write Set function in Button's OnSelect property but don't know what will be variable for me for that form.

 

In every video tutorial, Tutor has directly used VarFormTab as Variable name but no one has mentioned how did they get this variable name.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hello @suman4apr ,

If I understand you correctly, you simply want to navigate to a different screen when a tab button is pressed and you want to do this using a Variable. Firstly you do not have to use a variable to change screens, however you could call it whatever you want (vScreenTab probably makes sense if you are referring to it later, but you could call the Variable HomerSimpson and it would still work).

So to make this simple, I will call the screens Screen1, Screen2 and Screen3. Just replace these with your actual screen names.

To change screens, simply put on the OnSelected property of the button Navigate(Screen1) on button one and so on for the other two.

I am wondering however if when you refer to changing screens, you actually mean displaying a hidden form, in which case a variable would be useful.

In this case, on each button, you would set the Variable (I will call it vForm) to a different value. So the first button

UpdateContext({vForm:"Show1"})

the next two would be Show2 and Show3 (the name does not matter - you just refer to it as below. The Visible property of Form1 would be 

vForm="Show1"

The other two would then follow with the numbers and the form would only show if the Variable matched its Visible property.

Please let me know if this is what you are referring to.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

1 REPLY 1
Super User III
Super User III

Hello @suman4apr ,

If I understand you correctly, you simply want to navigate to a different screen when a tab button is pressed and you want to do this using a Variable. Firstly you do not have to use a variable to change screens, however you could call it whatever you want (vScreenTab probably makes sense if you are referring to it later, but you could call the Variable HomerSimpson and it would still work).

So to make this simple, I will call the screens Screen1, Screen2 and Screen3. Just replace these with your actual screen names.

To change screens, simply put on the OnSelected property of the button Navigate(Screen1) on button one and so on for the other two.

I am wondering however if when you refer to changing screens, you actually mean displaying a hidden form, in which case a variable would be useful.

In this case, on each button, you would set the Variable (I will call it vForm) to a different value. So the first button

UpdateContext({vForm:"Show1"})

the next two would be Show2 and Show3 (the name does not matter - you just refer to it as below. The Visible property of Form1 would be 

vForm="Show1"

The other two would then follow with the numbers and the form would only show if the Variable matched its Visible property.

Please let me know if this is what you are referring to.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (67,733)