Hello.
I'm using a button to save changes to a sharepoint list and send an email. There is an if statement that checks if a filed has been changed and sends an email based on that condition. In the email the field that was changed (from empty to some value) is somewhere in the body but it returns empty. However if the value is changed back to empty a new email is sent containing the value.
What may be causing this?
This is the code:
Patch('UT Tickets',varRecord, Form1.Updates, Form5.Updates,
If(varAssignedChanged = true ,{'Dags. úthlutað':Now()}),
If(varStatusCompleted = true, {'Dags. lokið': Now()}),
If(varStatusOnHold = true, {date_onHold_status: Now()}),
If(varStatusInProgressFSRE = true, {date_InProgress_status_FSRE: Now()})
);
If(varAssignedChanged = true, Office365Outlook.SendEmailV2(varRecord.'Tilkynnt af'.Email, "Mál " & varRecord.'Ticket Nr.',
"Kæri viðtakandi,<br>
Mál þitt með beiðnanúmeri " & varRecord.'Ticket Nr.' & " hefur verið úthlutað til " & varRecord.'Úthlutað til'.DisplayName & "<br>
Málið varðaði: " & varRecord.Title & "<br>
Kveðja<br>
UT"));
Navigate(MainScreen, ScreenTransition.CoverRight);