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 / change item from colle...
Power Apps
Unanswered

change item from collection?

(1) ShareShare
ReportReport
Posted on by 4

i have a collection like:

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

{token: xxx.text, hour:now(),status:"waiting"}

....

how do i change status from one specific token line?

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Richard555 

     

    Consider this example for OnVisible of Screen1 (to test it, first use the formula in OnVisible of Screen1, then create a blank Screen, click that Screen, and then click Screen1 again).

     

    ClearCollect(myColl,{token: "xxx.text.01", hour:Now(),status:"waiting"},{token: "xxx.text.02", hour:Now(),status:"waiting"},{token: "xxx.text.03", hour:Now(),status:"waiting"},{token: "xxx.text.04", hour:Now(),status:"waiting"},{token: "xxx.text.05", hour:Now(),status:"waiting"},{token: "xxx.text.06", hour:Now(),status:"waiting"},{token: "xxx.text.07", hour:Now(),status:"waiting"},{token: "xxx.text.08", hour:Now(),status:"waiting"},{token: "xxx.text.09", hour:Now(),status:"waiting"},{token: "xxx.text.10", hour:Now(),status:"waiting"});
    Patch(myColl,Index(myColl,3),{status:"done"});

     

    To trigger the above formula, click on another screen (if you don't have one, create a new, empty Screen, and then click that screen), and then, click Screen1 again.

     

    Now do this:

    Now click on the ellipses to the right of Settings, and then click Collections:

    poweractivate_0-1666669269709.png

     

    Notice the third item is changed:

    poweractivate_1-1666669308381.png

     

     

    To use a different record, just put something else other than 3 in the Index function's second argument:

     

    Patch(myColl,Index(myColl,3),{status:"done"});
    //replace 3 in the above with which Record you want changed. For example, 5 will change the 5th record.

     

    See if it helps @Richard555 

  • RahulAnsari Profile Picture
    58 on at

    HI,Richard555

     Try This Code

     

    Patch(
     myCollect,
     Index(
     myCollect,
     2
     ),
     {status: "Successed"}
    )

     

     

    If this solution helps you please give it a thumbs up and mark this as a solution.

    Regards,

    RahulAnsari 

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard