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 / ForAll is creating sam...
Power Apps
Answered

ForAll is creating same record multiple times on multi select option

(0) ShareShare
ReportReport
Posted on by

Hi,

Am using For all and Patch to create a new records on select of multiselect option and it is creating same record multiple times but not other selected records.

Below is code:

ForAll(Teams,

Patch(Tasks, Defaults(Tasks),

{Loop: true,

Subject: Substitute(Review.Selected.'Team Name'," test Team",""),

'Status Reason':' Status Reason (Tasks)'.'In Progress',

'Actual Start Date': Now()}));
ClearCollect(Teams, Review.SelectedItems)

Could you please some one help me out here as I don't know am doing wrong.

 

Regards,

Vishwa

 

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    You need to work with existing record scope in for all by using ThisRecord which reference current record that's in the loop.

    Like

    {ColumnName: ThisRecord.ColumName}

     

    For more info:

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

     

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @vishwanetula ,

     

    Try below:

    ForAll(Teams As T,
     Patch(Tasks, 
     Defaults(Tasks),
     {Loop: true,
     Subject: Substitute(T.'Team Name'," test Team",""),
     'Status Reason':' Status Reason (Tasks)'.'In Progress',
     'Actual Start Date': Now()
     }
     )
    );
    ClearCollect(Teams, Review.SelectedItems)

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard