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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard