Created
December 27, 2018 13:35
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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