The Power Architect

Archive

Hide commands from a SharePoint document library toolbar

The toolbar that appears in a document library (or list) in SharePoint Online can be customized (to an extent). We can hide, rename, change icons, and even rearrange the commands. 

Here is an example of a default library. By default, we see commands to create documents, Upload, Edit in Grid View, Sync, Add shortcuts to OneDrive, Pin to Quick Access, Export to Excel, and many more below the sub-menu. 

image.png

Here is an example of the library toolbar that has nearly everything hidden.

#3
December 1, 2023
Read more

Bypass first access consent dialog in Power Apps

How to use PowerShell to disable the consent dialog showing when a user opens Power Apps for the first time or when a new connection is added.

Set Consent Bypass

PowerShell can disable the consent dialog when the user opens the Power App for the first time or when a new connection is added.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
dir . | Unblock-File
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
Import-Module Microsoft.Online.SharePoint.Powershell -Verbose
Connect-SPOService -Url {Your SharePoint Admin Tenant URL}
Set-AdminPowerAppApisToBypassConsent -AppName {Your App ID}
#2
November 30, 2023
Read more

Validate Email Addresses in Power Apps

A common request when building Power Apps is to validate the email address of a textbox. This can be done easily using the IsMatch function. The function also does all kinds of validation using regular expressions. The Match.Email property can be used to check if it’s a valid email automatically.

If(
    IsMatch(
        txtValidationEmail.Text,
        Match.Email
    ),
    true // The email address is valid
    false // The email address is not valid
)

Here is an example of a TextInput and Icon control on the screen. The icon control shows a red error icon if the email is invalid and a green checkbox if it is valid.

A red error icon after an invalid email address.
#1
November 30, 2023
Read more
Brought to you by Buttondown, the easiest way to start and grow your newsletter.