Hey! I finally managed to set up the Patch function to a button in my form.
Problem is, I didn't know that this would mean that even if I'm editing items, it will still create a new item.
I need a way for the program to know when it is a new form and and edited form.
Through ChatGPT i found this formula but can get it to work:
Set(varRecord; LookUp(SharePointList; ID = SharepointForm1.LastSubmit.ID));
If(
!IsBlank(varRecord);
Patch(
SharepointList;
varRecord;
{
PATCHED ELEMENTS
}
);
Patch(
SharepointList;
Defaults(SharepointList);
{
PATCHED ELEMENTS
}
)
)
Do you have other suggestions or ways this code could work?