Friday, 28 February 2020

I love Power Apps

No self respecting technologies/programmer/ex-programmer likes simple solutions.  I still chose C# as my go to problem solver (I learnt to use a hammer 18 years ago and now all my problem look like a nail).  Don't tell anyone under 30 I still love C#, they think you are weird if you don't use Javascript for everything.  And 15 years ago I was arguing the same with the C++ golden oldies.  So the circle of life goes on.  Enter Simba, the Lion King...  Well not really but Power Apps is just making programmers look ridiculous.

Power Apps can do a lot...

MS have announce that components and PCF’s are part of Power Apps.  I've been using this for awhile and it's awesome.

This diagram outlines extending Power Apps using Components:  Developers often say you can’t extend Power Apps so it is not a real language, my answer is really… 
The other argument for PowerApps is if you need to do any complex programming.....  Use an Azure Function (this allows C#, PowerShell, JS, …).  Simple to build in your own language, expose using an http endpoint and you can call the end point using a custom connector.  
So if you need: 
  • Complex UI = go PCF, 
  • Reusable UI e.g. menu's = use Components, 
  • Complex processing or secure code logic = Azure Functions.
Here are some PCF examples that we can use that are already built:

So what is stopping Power Apps:
  1. Licencing - the licencing is expensive so you need to choose selectively when it is appropriate.  If MS change it's going to just go crazy the usage. IMHO. 
  2. Functionality:  MS have introduced automated testing to the Power Apps platform but there are improvements scheduled.  For me the biggest issue is code reuse.  I wish there was a function library that you could write functions to and call in a single line of code, my individual field logic can be insane and tough to amend on complex large Power App UI's.   

Saturday, 22 February 2020

Catch Error in Power Apps and App Insight Logging

Error Handling:
App Insights logging: https://sharepains.com/2019/01/24/powerapps-experimenting-with-error-handling/  Replaced as Microsoft have built in telemetery as of 3 Feb 2020.
https://powerapps.microsoft.com/en-us/blog/log-telemetry-for-your-apps-using-azure-application-insights/

Example Error capturing and tracing to Azure AppInsights
IfError( // Perform API Call , // Fallback so log here!
Trace("Pauls Unique PowerApp",TraceSeverity.Error, {UserName:User().Email,
Role:gblRole, ErrorMsg:ErrorInfo.Message, ErrorControl:ErrorInfo.Control,
ErrorProperty:ErrorInfo.Property});
Notify("Err message ..." & ErrorInfo.Message); // Display the error on the UI (remove before production release  );
To Review your App Insights Logging:
Open you Azure Portal > Open your App Insights blade >
Click the "Search" navigation option > Free text entry e.g. "Loyalty PowerApp"
App Insights, finding Traces generated in Power Apps

Monitoring Tool within Power Apps

The Monitor tool in Power Apps is great for debugging and tracing.
Start a monitor on the open Power App.

Monitor Tool - Showing a GET via a custom Connector and the returned response


Tuesday, 18 February 2020

Power Apps Component bug fixed


Problem:  Creating a new component with Input parameters.  When using the component and setting the custom input parameter with a global variable, the value passes thru, as the variable is reset, the control does not update with the variable.  Replication Steps are recorded  in the 2 min 20 sec recording showing the issue.


Initial Hypothesis: I have a large Power App project that uses this technique a lot.  The global variable were working until Fri 14 Feb 2020.  I believe the Power Apps version has been updated and is causing the issue.  I have tried the work on multiple environments and tenants.  It is happening across them all.

https://powerusers.microsoft.com/t5/Building-Power-Apps/Power-App-Components-not-working-with-Global-variables-used-with/m-p/473414

Warning: This affects Power Apps release 3.200221.27 (rolled out to me on Fri 14 Feb 2020), I think 3.20014.23 (latest release as of 13 Feb 2020) was still working correctly.  Don't change your app if it published on the lower versions until Microsoft release a new version.  This only affects Power Apps using Components and using Global variables on the component's input parameters.

Resolution: Power Apps release 3.20022.17 as of 20 Feb 2020 (UK tenant) has been fixed.  Quickly identified and corrected.

Wednesday, 12 February 2020

Power Apps - DTAP Azure diagram

Overview:  A sample architecture for DTAP in a highly controlled environment.  There are a lot of variations and the ability to use Power Apps publishing.


Sunday, 2 February 2020

Microsoft Teams Thoughts

Teams is pretty similar to Slack (which I use heavily for nearly 18 months).  The teams and channels concept make software development a pleasure even more so for teams with remote people which is pretty much all the software teams i work with for the past few years.
Teams brings multiple different functions under a single application.  Has all the feature of Zoom and Skype for Business for calling and meetings.
Note: Skype is being depreciate.  Teams supports also supports large meetings.  Allows you to add your own apps and approved ISV apps such as planners, Shifts.
Teams has a great calendar inside teams and you can use outlook to arrange Team meetings.
Each channel has Posts, files and Wiki (I love and use Wiki's in teams a lot, but you can remove the Wiki tabs easily)
Teams chat has the ability to share code snippets and the give control function is great for support and peer working.  The activity notifications work better than using email as your notification system which a lot of people tend to still do in large enterprise software projects.
Chats can now pop out into it's own window so it is separate from you MS teams client.  Very useful.
The reactions (e.g. like, surprise) within channels  are useful to build a strong team spirit.
Easy to add Canvas Power Apps, and work great with the Power Platform.
Teams native app is available on Mac, iOS, Android and Windows 10.

Zoom is more like Skype: Has meetings and chats, no file collaboration, apart from attachments in chats.  Files not 1st class citizen.  A small sub set of what Teams does.

Issues:
It's busy and users often don't like it for a few weeks.
Need to orientate yourself - the functionality is there, you just need to find it.
Apps don't keep session state when you change apps or focus.  MS I believe are going to offer popups and keep persistence shortly.

Updated: 20 May 2020: Who is a Chat/Conversation bot app that utilities MS Graph data: