Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

How to set default value to pivot in Creator kit

(1) ShareShare
ReportReport
Posted on 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
    TarrasQ 39 on at
    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.

  • Re: How to set default value to pivot in Creator kit

    Thanks bro you saved my day 🙂

  • GlennBullion Profile Picture
    GlennBullion 146 on at
    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
    egregorich 17 on at
    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)
  • 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
    HVO 18 on at
    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
    Umesh_12 5 on at
    Re: How to set default value to pivot in Creator kit

    In which property is to be added this code?

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    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

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

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard