Background:
- Submit data is the collection where I store my data.
- Success Count is where I want to count each record that had an empty error table. However, my code currently records ALL the items in SubmitData for each loop instead of just the count that went through without an error. How can I filter it to only the item that is being evaluated in the ForAll loop?
ForAll(
SubmitData,
If(
IsEmpty(
Errors('H2A Housing Inspection',
(Patch('H2A Housing Inspection'
,Defaults('H2A Housing Inspection'),
{Title: "",
DDate: Now()}
)
)
)
),
Collect(SuccessCount,SubmitData.Counter)
)
);
Notify(
CountA(SuccessCount.Counter) & " out of " &
CountA(SubmitData.region5),NotificationType.Success)