Greetings fellow powerapps users!
I am attempting to patch an existing record and I can't figure out where I went wrong. The below code is on the "Submit" button.
What is working - Onpress of the edit button, pause the refresh timer, set edit button visibility to false and the save button visibility true. I have achieved this. On press of the save button start the timer, Set save button visibility to false and edit button visibility to true.
What isn't working - On save I also want it to patch updates to the existing records in a sharepoint list 'TimeTracker'.
Error received - Invalid argument type. Expecting one of the following: Boolean, Number, Decimal, Text, OptionSetValue, UntypedObject. (This error isn't showing any red lines on the code; however, it isn't working as expected.)
Set(SubmitBtn, false) && Set(EditBtn, true) &&
Patch(
TimeTracker,
Gallery2.Selected,
{
Title: 'txt.Title',
CostCode: 'txt.CostCode',
'Time In':'txt.ClockIn',
SwitchJob:'txt.Switch',
'Time Out':'txt.ClockOut'
}
);
UpdateContext({startTimer:true})
Thanks in advance for any assistance!
-CodyO