Firstly
@MS.Ragavendar is on the right track here - the
As disambiguation operator is a more reliable syntax. Also
ForAll is not designed to be a loop, although it can act that way if it contains an action inside it.
ForAll creates a
Table, which can be Patched in one action to the data source and will run much faster than individual Patches for each record. If it contains the
ID of each record, it will update the specific records, if not it will create new records.
Patch(
'Project Task',
ForAll(
Gallery1_1.Allltems As _Data,
{
ID: _Data.ID,
Title: _Data.TextlnputCanvas11.Value,
Status: {Value: First(_Data.DropdownCanvas3_l.Selectedltems).Value},
'Target Date': _Data.DatePickerCanvasl_l.SelectedDate,
'Actual Completed Date': _Data.DatePickerCanvas2_l.SelectedDate,
Remarks : _Data.TextInputCanvas2_l.Value
}
)
)
Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
MVP (Business Applications) Visit my blog Practical Power Apps LinkedIn Buy me a coffee