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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Component property not...
Power Apps
Unanswered

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

Categories:
I have the same question (0)
  • Akser Profile Picture
    1,546 Moderator on at

    Hi @akg1421,

     

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

  • amk1421 Profile Picture
    195 on at

    @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?

  • Verified answer
    EddieE Profile Picture
    4,641 Moderator on at

    @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

    @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!

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard