cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Riftsan
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
mdevaney
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
mdevaney
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

Riftsan
Frequent Visitor

 

@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! 

Riftsan
Frequent Visitor

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

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (71,160)