cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
demarchiori
Level: Powered On

Change more than one record at once

Hi guys!

 

I am trying to update several records a sharepoint list at once.
I have 2 lists, each record in the list 1 should result (create) in 30 records in the list 2, the creation is not complex, I used a Collection to create the 30 records based on the information from the record on list 1, for this I use the script:

 

ForAll(CollectionName; Patch(List2; Defaults(List2); {Title: Title; ag_id_agenda: ag_id_agenda ; hora_inicio: hora_inicio; hora_fim: hora_fim; data_agendamento: data_agendamento; status_agendamento: status_agendamento; local_massagem_principal: local_massagem_principal; Massagista: Massagista})


Now I need a way to update the 30 records in list 2 when I change some information on list 1, if is possible, also a way to remove the 30 records in list 2 when I remove the the record on list 1.

The Records already have a key that identifies the dependency.

 

 

image.pngimage.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Change more than one record at once

You can use UpdateIf() to update multiple rows based on a condition. See the example below:

UpdateIf(TestList,ID=1,{Title:"Hello, World!"})

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

View solution in original post

2 REPLIES 2
EricLott
Level 10

Re: Change more than one record at once

You can use UpdateIf() to update multiple rows based on a condition. See the example below:

UpdateIf(TestList,ID=1,{Title:"Hello, World!"})

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

View solution in original post

demarchiori
Level: Powered On

Re: Change more than one record at once

Works perfect!

Thanks Eric!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,171)