web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : gQd1H+1N/HojXt1CdbAgNF
Power Apps - Building Power Apps
Unanswered

How to set default value to pivot in Creator kit

Like (1) ShareShare
ReportReport
Posted on 11 Nov 2022 08:56:38 by 5

I have added one pivot component from Creator Kit. I would like to set default selected item as first item(i.e Job Request View-Internal) . Below is the schema I am using in the items property of the pivot.

 

 

Table(
 {
 ItemKey: 1,
 ItemDisplayName: "Job Request View-Internal"
 },
 {
 ItemKey: 2,
 ItemDisplayName: "KnowledgeBank Tracker"
 },
 {
 ItemKey: 3,
 ItemDisplayName: "Learning Program Tracker "
 }
)

 

 

 

  • TarrasQ Profile Picture
    39 on 08 Nov 2023 at 03:56:07
    Re: How to set default value to pivot in Creator kit

    Can you confirm if this actually highlights the 'default' item or not. in my testing is still visually shows as being unselected.

  • Community Power Platform Member Profile Picture
    on 11 Jun 2023 at 07:36:25
    Re: How to set default value to pivot in Creator kit

    Thanks bro you saved my day 🙂

  • GlennBullion Profile Picture
    146 on 08 Jun 2023 at 16:53:27
    Re: How to set default value to pivot in Creator kit

    Reviving a slightly older thread here. I had the same issue. It's a shame there just isn't more "stuff" out there yet about the Power Apps Creator Kit. This was the only post I could find on the subject of making a tab coming back to a default on page changes.

     

    HVO, your solution came the closest for me, but I had a weird issue in that the first "click" after coming back to the page changed the tab, but not the selection border on the Pivot. I made some slight changes, following your lead.

     

    On Screen Visible and Hidden, I set a variable to the tab I wanted as a default:

     

    Set(varFormItemKey, "-Name of Default Tab-";

     

    Then, in the OnChange of the Pivot Control, I set the variable to the ItemKey.

     

    Set(varFormItemKey, Self.Selected.ItemKey);

     

    That seems to do the trick for me. Coming back into the screen, the default Tab is set, but I can navigate through the other tabs fine as well.

  • egregorich Profile Picture
    17 on 08 Feb 2023 at 19:55:40
    Re: How to set default value to pivot in Creator kit

    When selecting a tab on the Pivot control, you would show or hide containers and/or controls based on the selected tab.

     

    Tabs.Selected.ItemKey = "My Tab Key"

     

    The way I handle setting the default tab is by setting the visible property of the container I want visible by default to true if the SelectedKey is blank.

    If(IsBlank(Tabs.SelectedKey) Or Tabs.Selected.ItemKey = "defaultTabKey", true, false)
  • Community Power Platform Member Profile Picture
    on 04 Jan 2023 at 12:54:02
    Re: How to set default value to pivot in Creator kit

    can any one help me how to set defaukt value in pivot

  • HVO Profile Picture
    18 on 21 Dec 2022 at 01:30:07
    Re: How to set default value to pivot in Creator kit

    Within "Selected key" I use a variable:

     

    If(IsBlankOrError(varFormItemKey),"",varFormItemKey)

     

    When I navigate away from the page or to it, I set the variable with the value of the Item Key that I want as my default; whenever I select the other pivot items, I set the variable to Blank().

     

     

  • Umesh_12 Profile Picture
    5 on 11 Nov 2022 at 15:40:39
    Re: How to set default value to pivot in Creator kit

    In which property is to be added this code?

  • cha_cha Profile Picture
    4,932 Moderator on 11 Nov 2022 at 14:30:06
    Re: How to set default value to pivot in Creator kit

    I think you use this code

     

    First(Self.Items)

     

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

Announcing our 2025 Season 2 Super Users!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete