Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

TabList issue setting default

(1) ShareShare
ReportReport
Posted on by

I created a table, and i have a container popup with embeded Tablist, i would like to set the visible property to always show TabValue 1 first (site information), does anyone know what the formula for the visible property would be?

 

Table(
{Location:"Site Information",TabValue:1},
{Location:"Contact Information",TabValue:2},
{Location:"Modality Information",TabValue:3})

 

would also like to set the default form display to few if possible

 

attached screenshot for tablist

 

Categories:
  • Ravindra Jadhav Profile Picture
    Ravindra Jadhav 240 on at
    TabList issue setting default
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • CU10100204-0 Profile Picture
    CU10100204-0 2 on at
    TabList issue setting default
    I got you cover ! 
     
    So I build it into a component, because I felt easy to reuse over multiple apps I need to leaverage but it's not necessary. But basicly it goes like this:
     
    ClearCollect(colNavigationSubMenuContrats,
        {
            Id: 1,
            Title:      "Contrats",
            NavigateTo: ContratsDetails,
            IsVisible:  true
        },
        {
            Id: 2,
            Title:      "Projets",
            NavigateTo: Projets,
            IsVisible:  true
        }
    );

    This collection is use in "Items"
     
    For the "DefaultSelectedItems" I did this, and it's it work find all the time (No reset, No Clear, it's scalable and it just work):
     
    {
        Id: 1,
        Title:      LookUp(NavigationSubMenu.MenuItems,NavigateTo=App.ActiveScreen).Title,
        NavigateTo: App.ActiveScreen,
        IsVisible:  true
    }
  • mychau Profile Picture
    mychau 56 on at
    Re: TabList issue setting default

    This works. thank you

  • alecolli2 Profile Picture
    alecolli2 75 on at
    Re: TabList issue setting default

    @f2 / @vandam2 

     

    I found another work around using collections, if you are still looking for solutions or alternate ways to do this. Similar to using the radio, but instead using a collection, I have responded to another thread, you can see more details below;

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-To-Reset-Power-Apps-Modern-Control-Tab-List-To-Default-Value/td-p/2281624 

     

    Again unfortunately not a direct way and hopefully they will fix this issue, in the meantime I hope this helps

  • chrisrodman Profile Picture
    chrisrodman 2 on at
    Re: TabList issue setting default

    @f2 -- Found a workaround for this tab list not resetting to the default:

     

    1. Add a radio control with the same exact items as the tab list, example: 
      ["Open", "Closed", "All"]
    2. Set the DefaultSelectedItems property of the Tab list to the radio control, example: 
      [Radio1.Selected.Value]
    3. Set the Default property of the radio control to the default you choose, example: 
      "Open"
    4. Set a global variable in the Tab list On Change property, example: 
      Set(gblTabFilter, Self.Selected.Value);
    5. Set a button OnSelect property OR the screen OnVisible property (based on your app situation) to update the variable to the desired default, example: OnVisible of the screen that has the Tab list: Set(gblTabFilter, "Open");
    6. Set the radio control Default property to the variable: gblTabFilter
    7. Verify when selecting different tab list values that the radio updates to the same value
    8. Verify the tab list and radio are reset in the moment you want (might be from an OnSelect or OnVisible property in your scenario)
    9. Hide the radio control when done as the tab list is what we want to show and use by setting Visible property to false

     

    I am resetting the variable for radio default in the screen OnVisible as my scenario is user selects record on screen 1, and on screen 2 the tab list should always default to the same value.

    Hope the modern controls are updated ASAP to have basic properties to edit (font, colors, reset, default, etc.)!

  • f2 Profile Picture
    f2 105 on at
    Re: TabList issue setting default

    @vandam2 
    Did you ever get this resolved? I'm currently stuck with the same thing. Cant seem to make tab1 the default and unable to figure out how to use buttons to navigate either to tab1 or navigate through the tabs.

    I've almost finished my most ambitious app yet (well ambitious for me lol) and thought I would figure that out at the end, I'm now thinking I might need to re-do the whole thing using the old style controls.

  • vandam2 Profile Picture
    vandam2 on at
    Re: TabList issue setting default

    so frustrating, still doesnt work, tried the visible property but no luck, then tried a button to set variable and add varRecord in the defaulselecteditems, but nothing will work, it still sticks to the last selection you choose, 

     

    might just stick with normal tabs, tablists are too dam frustrating

  • timl Profile Picture
    timl 33,965 on at
    Re: TabList issue setting default

    Hi @vandam2 

    You can resolve this by setting the OnVisible property to this:

    Set(varRecord,
     Table(
     {Location:"Site Information",TabValue:1}
     )
    )

    You would then set the DefaultSelectedItems property of the tablist control to varRecord.

  • vandam2 Profile Picture
    vandam2 on at
    Re: TabList issue setting default

    it allows me to apply the default but when i select another tab, then leave teh screen and go back in it doesnt default back to Site Information, is there a way to set the tabvalue with visible property to default to tab1?

  • timl Profile Picture
    timl 33,965 on at
    Re: TabList issue setting default

    @vandam2 

    To do this, you'd set the DefaultSelectedItems property of the tab list control to this:

    Table(
     {Location:"Site Information",TabValue:1}
    )

     

    timl_0-1683652440347.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard