Skip to main content
Community site session details

Community site session details

Session Id : YY4g49hwKZhNox4Ebs1Z7k
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 20 Dec 2023 13:33:48 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!

 

  • CNT Profile Picture
    10,919 Super User 2025 Season 1 on 20 Dec 2023 at 14:45:17
    Re: Change Collection Value (Wert) to "true" after Button Click

    @Marczii007 

    Glad to help!

     

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

  • Marczii007 Profile Picture
    41 on 20 Dec 2023 at 14:44:12
    Re: Change Collection Value (Wert) to "true" after Button Click

    Thanks it worked!

  • Verified answer
    CNT Profile Picture
    10,919 Super User 2025 Season 1 on 20 Dec 2023 at 14:35:50
    Re: Change Collection Value (Wert) to "true" after Button Click

    @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 20 Dec 2023 at 14:24:10
    Re: Change Collection Value (Wert) to "true" after Button Click

    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 🙂


  • BCLS776 Profile Picture
    8,988 Super User 2025 Season 1 on 20 Dec 2023 at 14:17:21
    Re: Change Collection Value (Wert) to "true" after Button Click

     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

  • CNT Profile Picture
    10,919 Super User 2025 Season 1 on 20 Dec 2023 at 14:15:13
    Re: Change Collection Value (Wert) to "true" after Button Click

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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete