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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / CERTAIN CARDS APPEAR U...
Power Apps
Answered

CERTAIN CARDS APPEAR UPON ONSTART OF APP

(0) ShareShare
ReportReport
Posted on by 211

@WarrenBelz 

 

Warren,

Good day.

Have tabs at the top of app and certain cards become visible when the tab is clicked....works great.

But, when the app opens, no cards appear.

Need the cards of the first tab to be visible upon OnStart of the app.

Tried a few things... any guidance?

 

V/R

chudson002

 

Categories:
  • notj Profile Picture
    782 on at

    Can you share your current code and provide some screenshots? This will help everyone understand the question better.

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    What controls the visibility of the cards when the tab is clicked?  I assume clicking the tab sets some variable.  Just make sure that variable is set in the OnStart of the app or the OnVisible of the screen

  • chudson002 Profile Picture
    211 on at

    The tabs are in a Gallery:  OnSelect - Set(varTabSel, ThisItem.ID)
    Gallery:  Items - Table({ID:1,Label:"Nominee"}, {ID:2,Label:"Facility"}, {ID:3,Label:"CLO"})
    Each card Visible code is varTabSel = 1...and so on.  When the tabs are clicked, the respective cards appear.

    Just need the cards for varTabSel = 1 to appear OnStart of the app.

     

    V/R

    chudson002

  • chudson002 Profile Picture
    211 on at

    Set(varTabSel, ThisItem.ID) controls the cards when the tabs are clicked with the respective ID.

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    So you will need to set the variable in the OnVisible of the page to the number of the first tab. Then it will be set the normal way after that

  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Make sure to set the initial value of the varTabSel as per the below:

     

    BCBuizer_0-1624639231961.png

    In the tree view, click on "App", then select the "OnStart" property and fill out the code: Set(varTabSel,1) 

     

    When testing, right click "App" in the tree view and click "Run OnStart" to execute your code.

  • chudson002 Profile Picture
    211 on at

    Yep,  that did it.

    I was putting (=) instead of (,).

     

    Thanks,

    V/R

    chudson002

  • notj Profile Picture
    782 on at

    @chudson002 that's why people ask for screenshots and code samples 🙂 It helps!

  • chudson002 Profile Picture
    211 on at

    Yes, it does 🙂

    Will execute that practice moving forward.

     

    V/R

    chudson002

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard