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

Button tabs Issue

Hello,

 

I have two issues that I am hoping they are easy to fix. 
1. The button is floating around.

2. A way to make the button "default" without Select function
3. Maybe another way to create a tabular form?

 

I built a tabbing form with buttons and when you try to view, edit the form you have to click on one of the buttons (tabs) so that the data cards display. I was looking for a way to make the first button "default" so that it shows that data first but there isn't a feature that does that. I found the function Select() where it allows you to select(click) certain elements and I was able to execute it when the form loads. One of the issues with this is that I had to take out the button out of the SharePointForm because It would not let me select elements that were not under the parent. So I placed the default button under the Formscreen1 and now the form opens and clicks on the first "button"(Customer Information). (This was essentially my default feature I was looking for) but unfortunately, by moving the first button to the screen, this caused the button to be floating around when you scroll the form and I am looking for a way to "anchor" this button.

Each button is setting a variable for example:
OnSelect: Set(ScreenState,"Customer_Information")
and each Datacard has Visisble: Customer_Button.DisplayMode = DisplayMode.Disabled

On my formscreen1 I am doing:
OnVIsible: Select(Customer_Button);

setting1.pngsettings 2.pngtab.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@Riftsan 

Another method is to create a variable in the OnStart property of your app called currentTab and set the value to the default tab (for example Tab1).  After implementing this code in the PowerApps Studio make sure to click on Run App OnStart for the code to take effect.

 

Set(currentTab,"Tab1")

 

Next code each button representing a tab so it has this in the OnSelect property

 

Set(currentTab,"Tabl")  //put this code in Tab1
Set(currentTab,"Tab2")  //put this code in Tab2
Set(currentTab,"Tab3")  //put this code in Tab3

 

Then for each DataCard in the form you must put some code in the OnVisible property to indicate which tab it appears on

 

currentTab="Tab1"  //show only while on Tab1
currentTab="Tab2"  //show only while on Tab2
currentTab="Tab3"  //show only while on Tab3

 

None of this code requires you to use the SELECT function so hopefully it solves your problem. I use this method in my own work to create multitab forms and it does quite well for me.

No idea why your button is floating around though.

 

---
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."

 

 

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

@Riftsan 

Another method is to create a variable in the OnStart property of your app called currentTab and set the value to the default tab (for example Tab1).  After implementing this code in the PowerApps Studio make sure to click on Run App OnStart for the code to take effect.

 

Set(currentTab,"Tab1")

 

Next code each button representing a tab so it has this in the OnSelect property

 

Set(currentTab,"Tabl")  //put this code in Tab1
Set(currentTab,"Tab2")  //put this code in Tab2
Set(currentTab,"Tab3")  //put this code in Tab3

 

Then for each DataCard in the form you must put some code in the OnVisible property to indicate which tab it appears on

 

currentTab="Tab1"  //show only while on Tab1
currentTab="Tab2"  //show only while on Tab2
currentTab="Tab3"  //show only while on Tab3

 

None of this code requires you to use the SELECT function so hopefully it solves your problem. I use this method in my own work to create multitab forms and it does quite well for me.

No idea why your button is floating around though.

 

---
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."

 

 

View solution in original post

Highlighted

 

@mdevaney  Thanks for the quick response! 

I just updated the post and added images. I am doing the same thing in terms of setting variables when clicking on the buttons.
The only difference is my visible setting is "Customer_Button.DisplayMode = DisplayMode.Disabled"

The button started floating because of its no longer in a Datacard that the other buttons are under. I just placed the Customer button on top of the buttons Datacard so that I can be under the Parent "FromScreen1". 

Thanks! 

Highlighted

 Run App OnStart and setting my variable for the first tab was the solution. 

I moved the button back to the buttons datacard and removed the select function. 

Thank you!

 

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 (12,460)