Hi @KevDaRed ,'
You might have left the email out - I was referring to code relevant to the error function. Anyway, I parsed it as below and there were some bracket and commas errors. Note that I free-typed this in Notepad without the benefit of red lines, but I am sure you will get the idea. Also please post any code in a code box as I have below and if possible parse it.
*User personal details*/
Set(
varEmail,
User().Email
);
Set(
varFullname,
User().FullName
);
LoadData(
colPersonalInfo,
"colPersonalInfo",
true
);
Set(
varPersonal,
First(colPersonalInfo)
);
If(
Connection.Connected,
Refresh('End of Shift New Report');
Refresh('End of Shift - Users');
Set(
varPersonalInfoLookUp,
LookUp(
'End of Shift - Users',
varEmail = Email
)
);
If(
varEmail in 'End of Shift - Users'.Email &&
CountRows(colPersonalInfo) > 0 &&
(
varPersonalInfoLookUp.Title <> varPersonal.Title ||
varPersonalInfoLookUp.Email <> varPersonal.Title.Email ||
varPersonalInfoLookUp.Linemanageremailaddress <> varPersonal.Linemanageremailaddress ||
varPersonalInfoLookUp.IMDMemailaddress <> varPersonal.IMDMemailaddress ||
varPersonalInfoLookUp.TMEemailaddress <> varPersonal.TMEemailaddress
), //first if argument
Patch(
'End of Shift - Users',
{Email:varEmail},
{
Title: varPersonal.Title,
Email:varPersonal.Email,
Linemanageremailaddress: varPersonal,
IMDMemailaddress: varPersonal.IMDMemailaddress,
TMEemailaddress: varPersonal.TMEemailaddress
}
);
SaveData(colPersonalInfo, "colPersonalInfo"),
CountRows(colPersonalInfo) = 0 && varEmail in 'End of Shift - Users'.Email, //second if argument
ClearCollect(
colPersonalInfo,
{
Title: varPersonal.Title,
Email:varPersonal.Email,
Linemanageremailaddress: varPersonal.Linemanageremailaddress,
'IMDM email address': varPersonal.IMDMemailaddress,
TMEemailaddress: varPersonal.TMEemailaddress
}
);
SaveData(
colPersonalInfo,
"colPersonalInfo"
),
!(varEmail in 'End of Shift - Users'.Email) && CountRows(colPersonalInfo) > 0, //third if argument
Clear(colPersonalInfo);
SaveData(
colPersonalInfo,
"colPersonalInfo"
)
); //you have extra bracket here meaning this is not fourth If
LoadData(
SubmissionFormCol,
"SubmissionFormCol",
true
);
If(
CountRows(SubmissionFormCol) <> 0,
ClearCollect(SubmissionFormColCount, SubmissionFormCol);
ForAll(
SubmissionFormCol,
Collect(
'End of Shift New Report',
First(SubmissionFormColCount)
)
); //needed another bracket here
Remove(
SubmissionFormColCount,
First(SubmissionFormColCount)
);
Mail.SendEmailV3( . . . . .);
SubmitForm(Form2);
ResetForm(Form2);
Notify(
"Form successfully submitted",
Success
)
);
Clear(SubmissionFormCol);
SaveData(
SubmissionFormCol,
"SubmissionFormCol"
)
)
Also, have you considered shorter names??
Please click Accept as solution 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 Thumbs Up.