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 / Use values from canvas...
Power Apps
Answered

Use values from canvas in a component

(0) ShareShare
ReportReport
Posted on by 183

Hello 🙂

 

I'm building an app with a vertical nav menu on the left which is based on a component .

This component use galleries populated with a "Set Table" in the OnStart property of the app.

Everything works as expected, navigation is working well, pages are populated in the gallery of the component which can then be added to all my pages.

 

Before I started using a component I was manually adding my "hand crafted" menu on each pages, which was not a ideal situation. However, since then I was using a "notification" badge on menu item which reflected the number of items that was in the gallery displayed on each page. This notification badge was using CountRow() to extract the value which then was used in the text field of the notification badge like so :

Jedediah_0-1681828911285.png

 

Want I want now is being able to pass this information to the component for each menu items. I was thinking of adding a new field in the table of the OnStart() property but this doesn't seems to work. I would like to be able to add, in the gallery item of the component, a button which text property could contains the value I pass in the "gallery" field of the table :

 

Example of my idea :

Jedediah_1-1681829105244.png

 

Is there any way to achieve this ?

 

Thanks 🙂

Categories:
  • Verified answer
    Jedediah Profile Picture
    183 on at

    I was able to make this work but it seems that it only works when I'm on the dev interface.

    If I play the app from another account, the value from "CountRows" are not passed to the component.

    I can still add my notification badges manually en each pages but it would way more practical to have it in the component...

     

    Edit : so for now, my solution is to set some variables in OnStart() like this : Set(varName;CountRows(gallery_Name.AllItems))

    For an obscur reason, those variables are not populated with OnStart(). I tried playing the app and manually trigger OnStart with random success. 

    If I set the variables on the OnVisible() of a Screen, it works.

    It is a workaround but still not a viable solution of my original problem since I have to set each variables regularly (via OnVisible() or OnSubmit() to be sure to have up to date value.

     

    I'm still looking for a way to pass CountRows dinamicaly to my component...

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard