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 / Change Collection Valu...
Power Apps
Answered

Change Collection Value (Wert) to "true" after Button Click

(0) ShareShare
ReportReport
Posted on by 41

Hey Community,
i don't know, how i change every column of my collection after button click.

This is my following Collection. 

 

ClearCollect(
 colAusprägungsWert
 , {Wert: "1", Completed: false}
 , {Wert: "2", Completed: false}
 , {Wert: "3", Completed: false}
 , {Wert: "4", Completed: false}
 , {Wert: "5", Completed: false}
 , {Wert: "6", Completed: false}
 , {Wert: "7", Completed: false}
 , {Wert: "8", Completed: false}
 , {Wert: "9", Completed: false}
 , {Wert: "10", Completed: false}
);

 

 I want to change "Completed" to true, after Button click.

 

Patch(
 colAusprägungsWert,
 First(colAusprägungsWert),
 {Completed: true}
)

 

 This is my Navigation, where i want that the rectangles are filled after Button click.

Marczii007_0-1703079027531.png

 

Please help me out, with the OnSelect Statement.
Thanks!

 

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Marczii007 

    Please try the following,

    UpdateIf(
     colAusprägungsWert,
     true,
     {Completed: true}
    )

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • BCLS776 Profile Picture
    8,994 Moderator on at

     If you need to change them all with a single click, try this in the OnSelect of a button:

    ForAll(colAusprägungsWert As aRec,
     Patch(
     colAusprägungsWert,
     aRec,
     {Completed: true}
     )
    )

    Hope that helps,

    Bryan

  • Marczii007 Profile Picture
    41 on at

    Thanks for the response. Sorry for my description.

    I need the following:  if i click on ">", the first Column Value set to "Completed: true". If i click again on ">" the second column is set to "Completed: true", what means the second rectangle is filled.

    I don't need to have all filled after button click 🙂


  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Marczii007 Set a variable in the OnStart,

    Set(varCounter, 0)

    Then use this formula,

    Set(varCounter, varCounter+1);
    Patch(
     colAusprägungsWert, Index(colAusprägungsWert, varCounter),
     {Completed: true}
    )

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • Marczii007 Profile Picture
    41 on at

    Thanks it worked!

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Marczii007 

    Glad to help!

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard