I have a collection of data that I will be uploading to a SharePoint list. I want to first check to see if the first two columns will match an existing row in that list. If it does then I want it to do nothing, otherwise it will patch the new record. I feel like the solution here is to use a combination of ForAll, LookUp, and Patch, but for the life of me I cannot get it to work.
ForAll(
colFinal,
If(
LookUp(Acronyms, ThisRecord.Acronym = Acronym && ThisRecord.Definition = Definition, true),
"",
Patch(
'Acronym Submissions',
Defaults('Acronym Submissions'),
{
Acronym: ThisRecord.Acronym,
Definition: ThisRecord.Definition
}
)
)
);
The error I'm getting when using the above code is that it's expecting a Text value instead of a record in the Patch function. After doing some research I found others had the same issue, but they were performing the LookUp on a single piece of information within the record rather than the entire record itself. I have a feeling that I have the order wrong or the entire concept wrong, as the problem lies with the ThisRecord portion in the Patch.
I'm not sure what I'm doing wrong as I feel like I've done something similar to this before.