I have a group of animals with numbers and one has got an event in an event table (like a vaccination).
All 40 animals of the group need the same vaccination but since that is a lot of work i want to copy the event (vaccination) to the other animals. The event record has many fields (columns) which may be more in the future so I definitely do not want to name them all anywhere in this code.
I get the animals (numbers) in a collection an do
If(
Toggle1.Value And (CountRows(TargetDieren)>0)
;ForAll(TargetDieren
;If(Val>0;Patch(DierEvent;Defaults(DierEvent);SelectedDierEventRecord;{DocaDierId:Val}))
)
)
Where TargetDieren is the collection, Val is the animal number field in that collection, SelectedDierEventRecord is the record to copy and DocaDierId the id field in the event table. Toggle1.value is just the state of a copy or move toggle.
Where this goes wrong is that the original record contains certain fields I may not write to because powerapps does that like versionnumber. How can I avoid this?