Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Component property not evaluating at Screen level. Added component with custom properties and set component property at screen level - Progress bar / Items / colors / activeStep

(1) ShareShare
ReportReport
Posted on by 195

Implemented a component (simpler version) from this link: https://www.c-sharpcorner.com/article/progress-bar-component-in-powerapps

 

Component has three properties: items(Table) , activeStep(Text) , colors(Record) 

1- items(Table) 

 

Table( 
 { 
 Label: "stage x", 
 Id: 1, 
 Visible: true 
 }, 
 { 
 Label: "stage y", 
 Id: 2, 
 Visible: true 
 }, 

 ... //more stages
)

 

 

2-  activeStep(Text) I leave it blank or set to "" at component level

3-  colors(Record) 

 

{ 
 StateActive: "#fde772", 
 StateDone: "#7ad568" 
} 

 

 

At component level set "Fill" property of circle in gallery to (I used Label instead of Id which makes it simpler)

 

 

ColorValue( 
 If( 
 And(ThisItem.Label = ProgressbarComponent.activeStep,ThisItem.Label = "stage y"),
 ProgressbarComponent.colors.StateDone,
 ThisItem.Label = ProgressbarComponent.activeStep,
 ProgressbarComponent.colors.StateActive,
 "Gray"
 )
 )
//activeStep is "" later set to ThisItem.activeStepListCol at screen where component added

 

 

But at screen the Fill property of Circle doesn't evaluates to the right value even though Progressbar.activeStep is now "ThisItem.activesStepListCol" 

Snap 2023-03-01 at 11.13.36.png

 

So instead of using "Progressbar.Id" from original linked blog in Color property of Circles added in gallery I used "Progress.Label = Progressbar.activeStep" . And at screen level I set the "Progressbar.activeStep" property to "ThisItem.activeStepListColumn"

 

What's the issue.. why does setting the component.activeStep at screen level not affect fill of circles?
@WarrenBelz @Drrickryp @BCBuizer @iAm_ManCat @LaurensM @TheRobRush @zmorek @EddieE @Ethan_R @timl @Pstork1 @Akser @Rusk @victorcp @JR-BejeweledOne @mmollet @BCLS776 @Shavar_Scott @SanshubhLubal @Tony_Bowes_BP @alaabitar @RusselThomas @Tony_Bowes_BP @zmansuri @golfnutt82 @Bilakanti @RJM07 @Tango @MJ84 @DGWolfe @Anonymous_Hippo @Anchov @KeithAtherton @amyharkus86 @Vaibhav_k @Anonymous @rubin_boer @Anonymous @Schwartz_Cory @MS_Gonzo @galos @Anonymous @Intoxicated @ash15 @Adrian_Celis @phipps0218 @Nat_SGRE @SolTeferi @Jean-Philippevb @TrayH

  • amk1421 Profile Picture
    195 on at
    Re: Component property not evaluating at Screen level. Added component with custom properties and set component property at screen level - Progress bar / Items / colors / activeStep

    @EddieE 
    Hmmmmmm..... Components property set to a variable (vActiveStep) which is set later in screen does the job. But it also has to do with components scope setting i.e.

    Settings > Upcoming features > Retired > "Collection access in component scope" needs to be turned off

    2023-03-06 14_44_44-Power Apps and 1 more page - Personal - Microsoft​ Edge.png

    And "Access app scope" in component's properties needs to be ON.

    2023-03-06 14_43_56-Power Apps and 1 more page - Personal - Microsoft​ Edge.png

     

    Thanks for the help!

     

  • Verified answer
    EddieE Profile Picture
    4,641 Super User 2025 Season 1 on at
    Re: Component property not evaluating at Screen level. Added component with custom properties and set component property at screen level - Progress bar / Items / colors / activeStep

    @akg1421 

    The activeStep property is your issue, I believe. There's no direction in that blog on how to use it, which is poor, and if you're not sure how to go about this then you can come unstuck.

     

    It sounds like you are using a gallery to try and set activeStep - which isn't working - but what you could try is this.

     

    - In your component, set activeStep to a variable called vActiveStep. This will throw an error initially.

    - then, back in your gallery, change the OnSelect to

    Set( vActiveStep, ThisItem.activeStepListCol)

     

    You will need to delete then re-add any components after this change.

     

    I was able to get the above to work by adding the variable to activeStep, then adding a TextInput control and adding this code to the OnChange 

    Set( vActiveStep, Value(Self.Text))

    I stayed with using ID - as per the blog - instead of Label like you've done, so there maybe some slight changes needed on your part.

  • amk1421 Profile Picture
    195 on at
    Re: Custom Component property not evaluating at Screen level. Added component with custom properties and set component property at screen level - Progress bar / Items / colors / activeStep

    @Akser I checked its not spelling or semantic related. Can you produce the same (create a component with said properties) at your end and confirm?

  • Akser Profile Picture
    1,546 Super User 2025 Season 1 on at
    Re: Custom Component property not evaluating at Screen level. Added component with custom properties and set component property at screen level - Progress bar / Items / colors / activeStep

    Hi @akg1421,

     

    Shouldn't it be "Stage y" (capital S)?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard