Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

COB ESPC18 - Rich PowerApps with offline support


Published on

A presentation I gave at ESPC 2018 (the European SharePoint, Office 365 and Azure Conference) about enterprise PowerApps. Focus areas include how to implement offline support, how to connect to on-premises data, and various tips for performance and management. I also talk about what I find to be the most important PowerApps functions from the list of 150+ that can be used in PowerApps formulas.

Published in: Technology
  • ♣♣ 10 Easy Ways to Improve Your Performance in Bed... ◆◆◆
    Are you sure you want to  Yes  No
    Your message goes here

COB ESPC18 - Rich PowerApps with offline support

  1. 1. Enterprise PowerApps – Rich Apps with Offline Support and On- Premises Data Chris O’Brien (MVP) Independent/Content and Code
  2. 2. Use Excel-like formulas – not code To do Formula “Next” button to change screen Navigate(MyScreen, ScreenTransition.Fade) Add item to SharePoint list Patch(MySharePointList, Defaults(MySharePointList), { FirstName:TextInput1.Text, LastName:TextInput2.Text } ) Add record to local collection (cache) ClearCollect( SelectedProducts, { ID: ProductID, Name: ”XT1000” } )
  3. 3. Not required
  4. 4. The mobile experience PowerApps app must be installed from App Store Apps appear within the PowerApps app
  5. 5. Types of PowerApps Canvas apps Model-driven apps Customised SharePoint list forms
  6. 6. Customising SP forms vs. canvas apps Customised SP forms: Other considerations:
  7. 7. CASE STUDY APP Pilot/crew leave requests
  8. 8. The scenario POC for airline pilots (leave requests) Flying a plane is the perfect time! Offline support Ability to connect to on- premises data
  9. 9. DEMO – Leave Requests PowerApp
  10. 10. Flow
  11. 11. Implementing the PowerApp Key findings Some surprises
  12. 12. Functions for SharePoint data Patch • Add list item Collect • Fetch list item Update • Update list item Delete • Remove Multi-page forms Person/Group fields Taxonomy fields
  13. 13. A Patch command in our app
  14. 14. A Patch command in our app (formatted)
  15. 15. Implementing offline support Pattern Poll for local record – LoadData/ForAll PATCH if connected Navigate to confirmation screen
  16. 16. On-premises data gateway Considerations
  17. 17. Working with data Connection is hit when: Data-related functions: Connection (e.g. a database) Data source (e.g. a table)
  18. 18. Using a Gallery control for navigation The pattern On start - define collection of screens (with ClearCollect) Gallery OnSelect - lookup screen from selected item, then navigate
  19. 19. DEMO – Implementing offline and integrating data
  20. 20. PowerApps tips Performance, key functions, responsive apps
  21. 21. Tips – key PowerApps functions To do Use Set a global variable available across all screens Set() Set a context variable in a single screen UpdateContext() – and also Navigate() Change screen Navigate(), Back() Save a local record (e.g. for offline) Collect(), ClearCollect(), Update – use SaveData() to store Open a web address/app Launch() Get data on current user User() Display a message banner Notify() 150+ functions in total. See: us/powerapps/formula-reference
  22. 22. Tips Get used to: Lots of fiddly work to generate PATCH command  Adding a “debug screen” with labels showing variables etc “Declarative” variables Variables and If statements NOT:OnLoad-If(X){Label1.Visible=true}else{Label1.Visible=false} INSTEAD:Label1.Visible=if(X,false,true) Conditional display Adda“rule”tocontrol,usepaneltoconfigurewhatpropertieswhichshouldbeset(e.g.Visible=false)
  23. 23. Be careful loading data sources Tips - performance us/blog/tips-for-a-maintainable-extensible-app us/blog/performance-considerations-with- powerapps/ Consider not loading OnStart (slow app load) Load into local collections and consume those Use Concurrent() if appropriate (e.g. multiple data sources) Using a Connector? Avoid multiple trips to the server
  24. 24. Tips - using PATCH with SharePoint fields To do Use Update a choice/lookup from a dropdown Paternity_LengthOfPaternityLeave: { '@odata.type':"#Microsoft.Azure.Connectors. SharePoint.SPListExpandedReference", Value: ddlPaternityLeaveDuration.Selected.Value, Id: 1 } Update a person field currentUser: { '@odata.type':"#Microsoft.Azure.Connectors. SharePoint.SPListExpandedUser", Claims:"i:0#.f|membership|" & Lower(User().Email), Email:User().Email, JobTitle:".", Picture:"." }
  25. 25. Responsive canvas apps Adapt to screen size – not just phone/tablet choice + -
  26. 26. PowerApps - the good
  27. 27. PowerApps - the bad
  28. 28. PowerApps - the ugly
  29. 29. My favourite recent/upcoming features Available or in preview • PowerApps web part in SharePoint! • New size/layout options - choose size OR use responsive (with formulas) • Improved performance – parallel data load, faster SharePoint forms • App checker • ALM – solution export/import • Up to 20MB offline storage • Message panel (Notify function) Jan 2019 • Better debugging – e.g. in middle of formula (Jan 2019) • Easier cascading dropdowns (Jan 2019) • Friendly SharePoint names in formulas
  30. 30. Takeaways PowerApps can be VERY transformative for an org with lots of forms/processes Very easy to get apps onto mobile devices “Simple” requirements can sometimes be difficult to implement 1 2 3 4 PowerApps are going to continue to evolve!
  31. 31. Resources us/blog/
  32. 32. Thank you!!  Any questions? @ChrisO_Brien