Hello,
Below is my code:
ForAll(
SPMeetings,
{
//Check if an entry already exists in coldata with the same combination of Project, NewMeetingType, MeetingDate, Dateline, and PIC
If(
CountRows(
Filter(
coldata,
Project = ThisRecord.Project &&
NewMeetingType = ThisRecord.NewMeetingType &&
MeetingDate = ThisRecord.MeetingDate &&
Dateline = ThisRecord.Dateline &&
PIC = ThisRecord.PIC
)
) > 0,
// If an entry exists, update it with the new Description and Action Item
UpdateIf(
coldata, // Collection to update
Project = ThisRecord.Project &&
NewMeetingType = ThisRecord.NewMeetingType &&
MeetingDate = ThisRecord.MeetingDate &&
Dateline = ThisRecord.Dateline &&
PIC = ThisRecord.PIC, // Condition to identify the item to update
{
Description: ThisRecord.Description, // Update the Description field
ActionItem: ThisRecord.ActionItem // Update the Action Item field
// You can add more fields to update if needed
}
),
// If no entry exists, add a new entry
Collect(
coldata,
{
Project: ThisRecord.Project,
NewMeetingType: ThisRecord.NewMeetingType,
MeetingDate: ThisRecord.MeetingDate,
Dateline: ThisRecord.Dateline,
PIC: ThisRecord.PIC,
Description: ThisRecord.Description, // Add the Description field
ActionItem: ThisRecord.ActionItem // Add the Action Item field
}
)
)
}
);
I got an error in ForAll() that says the function expected 2 arguments but received 4 in return. i cant seem to figure out what went wrong
Thank you in advance !