Set value of a field using PowerFx in a CommandBar

You can set the value of a field within a Command Bar within PowerApps using a formula such as:

Patch(
ShirreyPrindeys,
Self.Selected.Item,
{
Membership: 'Membership confirmation check'.'Is a Member'
}
)

This sets the Membership field, which is a Choice, to the value provided, which is expressed as a property of the choice.

Memory limit exceeded in PHP/Laravel error handler

Error handling, investigation and diagnosis is challenging in PHP at the best of times, more so when it isn”t possible to get the error that is occurring.

In this case, Laravel (v8) was attempting to build a nice error page for display, but the error exceeded the page’s ability to deal with the data. This resulted in memory allocation issues, long execution times and a 594 Gateway timeout at Nginx. Additionally, there is no useful information emitted to the app/storage/logs/laravel.log file.

This is the error that is actually happening:

In order to get to the underlying error, it is possible to disable the code that is running out of memory by modifying the /app/app/Logging/CustomizeFormatter.php file and remove the json_encode() call.

Of course, modifying vendor files is not a permanent option so be sure these changes are not committed/persisted!

Resolving OAuth errors connecting PowerApp to Twitter

The Microsoft Training Path for the Power Platform has you configuring Sharepoint with neat approval workflows and Twitter. Unfortunately, the Twitter piece can prove challenging with cryptic errors.

It was too easy to just blame Elon Musk’s recent spats for restricting or breaking API access.

When connecting to Twitter’s API, you should set up a Developer account at https://developer.twitter.com and create an Application. Following Musk’s takeover of Twitter, there is a free and a “basic” tier of service. The free tier should suffice for this challenge.

When creating the Application for Twitter, be sure to ensure that the user has Read/Write permission. Take a copy of the API key and secret, before returning to PowerApps.

When configuring the Flow in PowerApps, the Twitter connection will be configured with the settings created in the Application for Twitter.

When configuring the Twitter connection, errors you will get include variations of:

  • ApiConnectionLimitExceeded. Failed to create connection for connection id
  • Create and authorise OAuth connection failed
  • Failed to create connection for connection id

Some errors indicate you have reached the limit for API connections. This indicates that you have more than 2 Connections configured. You should delete at least one and try again.

This Stack Overflow post suggested using the URL https://global.consent.azure-apim.net/redirect for the Callback URL in the Project settings section:

You should select “Bring your own application” for the Application type.

The language is ever so slightly different between PowerApps and Twitter:

PowerApps languageTwitter language
Consumer KeyAPI Key
Consumer SecretAPI Secret

This will create a new Connection, which should work if the above has been configured correctly.

Password Manager: NordPass vs Enpass

I’m reviewing my favourite password manager for possible secure sharing of some passwords for family use, and thought I’d give NordPass a try, a new product being pushed to me as part of my NordVPN subscription.

Enpass appears to be a little-known application that is not only free but integrates well into my Windows desktop, Android phone and various browsers. Its focus is to maintain a secure file locally to the computer, though the clincher is that it will work with a shared file on your chosen cloud provider. I use OneDrive to sync between multiple devices.

NordPass is from NordVPN and comes with the same assurances of security as NordVPN, which one just has to believe. VPN providers already use questionable marketing practices against potential new users and existing users (try and find your account login page) so it’s difficult to find out if the product is a good fit without signing up for it. There is no trial period.

I’ll use a product comparison chart, as marketers like to do, to distill the differences:

EnpassNordPass
CostFreeVaries. Appearance of being heavily discounted. Roughly £3.69 per month.
Stores on own serversStores locally, with user-selected synchronisation to cloudStored on own servers
SpeedFastSlow – have to assume due to heavier encryption
Platform availabilityWindows
Firefox
Android
iOS
Windows
Firefox
Android
iOS
Can share passwordsNoYes – requires other person to have NordPass software
Automatic form submissionYesNo
Memorable password generationExample: 3Unfounded-Unreached9-woe

Remembers selection of “Pronouncable”
Example: pAx-c0Sm063n1c-l4K3d-8A8ul5

Requires selection of “Words”, “Use capital letters” and “Use digits” every time
Password generation at fieldYes, and retains for automatic addition to fileNo
TemplatesProvides templates for varying types and services with optional and optimised custom fields.None
It’s a marketing comparison grid to help you make the “right” decision.

The answer is obvious.

1917 (2019)

Watched in HD in Dolby Digital 5.1 on Amazon Prime.

1917 (2019) at IMDb

Two soldiers are sent with an urgent errand to another company to call off an attack which would result in carnage thanks to a German trap.

Hope is a dangerous thing

Colonel Mckenzie

Like Hitchcock’s Rope, Sam Mendes and Roger Deakins have dinner an astounding job of stitching scenes together to give the appearance of a single shot. Between running nose-to-nose with the actors and swinging and flying around the action, you get an intimate and vivid – and often grim – insight into war.

News of the World (2020)

Watched in HD, Dolby Digital+ 5.1 on Netflix

News of the World (2020) at IMDb

Even though I’m not a Tom Hanks fan (strike me down) I still look out for his work.

After the American Civil War a Captain of the army that has taken up the role of a traveling news reader comes across a girl whose family were killed. He takes her with him to find a home across a state still recovering from war and finding its identity where racism, gun slinging and sinister intentions remain.

Whilst it’s disappointing to see the same problems are still evident today (racism, lack of tolerance of others), I think I must have missed the supposed grip of this film. An interesting tale with a fairly obvious conclusion. But still, Tom Hanks, based on his holding the room telling the news I think he needs to work for BBC News 24.. Someone snuck inspiration from Leonard Cohen’s Hallelujah in the score, which will serve as an ear worm for the night.

Greenland (2020)

Watched in 4K HDR, Dolby Digital+ 5.1 on Amazon Prime

Greenland (2020) on IMDb

A meteor strike is easy pickings for a disaster movie. A family of three have to make it to a safe area before the inevitable, fighting through panicking people whilst rebuilding their marriage. There’s nothing like a meteor strike to remind you of your wife and kid.

Two hours of ramping up tension, watching people sinking to new lows to survive. A hard watch emotionally, not a great thing to watch at the moment if you’ve got bad nerves, but maybe that’s what humanity needs. Reminds me of what a colleague once told me, “things can always get worse”.

Sunshine (2017)

Watched in HD, Stereo on Rakuten (Chromecast with Google TV)

Sunshine (2017) at IMDb

A second mission is mounted to follow a failed mission to “re-ignite the Sun” and save humanity. Dodgy physics aside (even if Brian Cox was involved), the story becomes personal with tensions and difficult decisions to be made about individuals vs. humanity. A little weird to see Michelle Yeoh almost sidelined by lesser-known British actors but those actors more than made their leads worthwhile.

If the wisdom of calling a spaceship that is heading towards the Sun to save humanity “Icarus” is foolhardy, calling the first one “Icarus I” is pure fortune telling. It is difficult to keep up with the pace of the manoeuvres of the ships, Kubrick definitely got that right. Boyle’s point of the Sun being bright was impressive and tested my retinas to the max. I can now see 256 shades of pure white.

I also discovered that Rakuten doesn’t support anything more than Stereo on my varied and capable set-up so that’s the end of that. Back to physical media.

Life in a Day 2020 (2021)

Watched in HD, Stereo

Life in a Day (2021) at IMDb

Following on from the 2010 version, on 25th July 2020 people from 192 countries filmed over 300,000 hours of amateur footage depicting their lives. Marriages, proposals, births, deaths, racism, break-ups, masks, no masks, protests, homelessness, effects of climate change, solitude, spirituality and some awesome trains.

I’m not a fan of the “day in the life” videos, but this collection of quick edits adds more during the Coronavirus pandemic. You don’t get chance to build a relationship with the characters – people – but their joy, sadness, satisfaction and plight is no less impactful. The close-ups with animals are better than any David Attenborough, the deliberately unfinessed production is certainly authentic.