Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Created December 27, 2018 13:35
Show Gist options
  • Save chrisobriensp/084b6601a878cb3c9680821435ddb563 to your computer and use it in GitHub Desktop.
Save chrisobriensp/084b6601a878cb3c9680821435ddb563 to your computer and use it in GitHub Desktop.
PowerApps formula to submit a record if device is online - can be run on a timer OnEnd function for example.
If(
Connection.Connected && !IsEmpty(LocalRecord),
ForAll(
LocalRecord,
Patch(
'My SharePoint list',
Defaults('My SharePoint list'),
{
Title: Concatenate(
"Leave Request - ",
User().Email,
" - ",
Text(
Now(),
"[$-en-GB]dd/mm/yyyy hh:mm"
)
),
Requestor: currentUser,
RequestorStaffNumber: txtRequestorStaffNumber.Text,
LeaveRequestType: LeaveType
}
)
);
Clear(LocalRecord);
Navigate(
ConfirmationScreen,
ScreenTransition.Fade
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment