August/September 2022 has been a busy month for the Power Platform
Here are two experimental features I think are massive: Named formulas & ParseJSON
New upcoming feature |
ParseJSON |
August/September 2022 has been a busy month for the Power Platform
Here are two experimental features I think are massive: Named formulas & ParseJSON
New upcoming feature |
ParseJSON |
Problem: Dataverse/Dynamics has a great way to generate Word or Excel documents in Model apps using the UI. I want to generate a generate letter from a CDS entity/Table when the status changes. And I'm not allowed to use OneDrive/SharePoint (governance restriction).
High-Level Steps:
1. Create Dataverse Table - ensure "Notes" & "Business process flows" are enabled
2. Generate the Word Template & add it to the "Template View"
Generate Word Template with dynamic column vals |
Add Template |
3. Create a Process to generate the output/docx from the Word template i.e. generate when status of the row changes
Activate the Workflow |
Problem: As part of my OAuth process I need to swap and authorisation code for an Access Token using an API, the issue is that I need to get the token into PowerApps.
Initial Hypothesis: Initially I created an Azure Function that does the API post as it was the easiest. But I reverted and thought it must be easier for me to have fewer working parts and as my solution used Power Automate and I've previously used Power Automate with the HTTP custom connector I'd use the same approach. It proved fairly tricky to get the HTTP connector to work but with some playing around and clarification of my thinking it became rather straight forward.
Firstly, I need to ensure the API is working, so I use Postman:
![]() |
Postman POST request using form-urlencoded. |
Solution: From the raw HTTP trace, I realised I needed to post the body in Power Automate in the correct format. Key value pairs for parameters and separate with an Ampersand. Also, Url's need to be escaped/encodes, in C# there are functions to encode and decode. I needed to do the encoding using Find() and Replace() methods (sic). From Power Automate, I return the Access token, refresh token and other info back to Power Apps.
More Info:
Uri.UnescapeDataString(String) Method (System) | Microsoft Docs
Understanding HTML Form Encoding: URL Encoded and Multipart Forms - DEV Community
Overview: It is a good idea to have an agreed set of standards in an organisation and within the development teams. Microsoft has Power App Canvas Coding standards and guidelines, use this as a base.
At a high level, the design and implementation needs to consider:
Governance:
Also see: App Insights for Power Platform - Part 3 - Canvas App Logging (Instrumentation key)
WIP
<Add coding standards for Power Apps and Power Automate>
Overview: Dynamics 365 CE (Customer Engagement) is a subset of the Power Platform and Dataverse. It provides commonly used entities such as Accounts and Contacts. There are five apps that can add specific CRM functionality. It is Microsoft's CRM solution.
There are 4 core subject (model) apps in Dynamics 365 CE
Common Data Model - Agreed between various companies including Microsoft so there is a set schema that we use as a base for our businesses. Example entities:
Overview: I get a JSON string representing an object into Power Apps. I want to extract the values so i can use them in PowerApps. Since this post, the ParseJson function was release in Power Apps, use that instead.
Tip: The is a great website for looking at JSON. Otherwise I tend to use VS code.
Possible Solutions:
Thoughts: I feel this is a big challenge for NoCode/LowCode solutions like Power Platform, it can be overcome with a little jiggery-pokery but I feel the PowerFx language should have an ability to cast JSON into an object and in turn allow object arrays in collections. A lot of people have been asking for this on UserVoice.
Update: Sept 2022
The ParseJSON function is now in Power Canvas Apps, a huge improvement. There is still an issue, the ParseJSON in not strongly typed, so it's still hard to deal with complex objects containing arrays in Canvas Apps. Ideally I'd like to be able to add a schema to run against the untyped object to have a strongly type object to work with.
Overview: Technical Debt generally refers to a buildup of deficiencies that makes changing code or optimizing systems difficult. The key is to identify what in you organisation/program/project makes up technical debt.
Technical Debt generally refers to poor or missing NFRs such as Performance, Security, Maintainability, Reliability, Scalability, Testability, or Resiliency. But it also can go further into future architecture, so if this part of our system is popular can we easily adjust and keep releasing features. So as you can see, technical debt can be very wide and it's far better to focus a subset otherwise PO and PM's tend to scope everything under technical debt and wit gets nasty telling them about "additional technical debt".
I find the easier way to go about defining what is technical debt to avoid long discussions to to list out what cannot be considered technical debt. This would be my minimum starting point:
Another items is spaghetti code that falls under the NFR of code maintainability, with old systems you have to be pragmatic, if the product brings in $100k per year it's not a good idea to spend $120k a year making the code more readable but not improving the technology as a general rule. On old systems, I try to keep code maintainability out of the technical debt,. You should put it to another more detailed section, just don't lump everything especially when it is huge changes all under technical debt. Dev teams loose focus and it causes problems don the line. All too often, over exercised bundling debt pushed into technical debt results in "even more interest to pay later".