28 December 2020

Extensions enhancement - IsStrong() method added

The .IsStrong() method was added to both the System.String and System.Text.StringBuilder objects.  It allows the developer the ability to quickly check if a string is a valid strong password e.g.

"blog.cjvandyk.com Rocks!".IsStrong()

will return True.  You can limit the number of aspect matches thus:

"blog.cjvandyk.com rocks!".IsStrong(3)

which returns True because 3 of the 4 aspects are matched in upper case, lower case and special characters.  Not passing an aspect number results in all 4 being required thus:

"blog.cjvandyk.com rocks!".IsStrong()

Will return False.


For a more detail of what Extensions offer, see:







Add Extensions to your toolbox and make your coding life a little easier.  

Happy coding
C

21 December 2020

Extensions enhancement - HasSymbol() method added

The .HasSymbol() method was added to both the System.String and System.Text.StringBuilder objects.  It allows the developer the ability to quickly check if a string contains symbols or special characters e.g.

"blog.cjvandyk.com Rocks!".HasSymbol()

will return True whereas:

"blogcjvandykcom".HasSymbol()

will return False.


For a more detail of what Extensions offer, see:







Add Extensions to your toolbox and make your coding life a little easier.  

Happy coding
C

07 December 2020

How do I - Check if a field is empty in PowerAutomate?

In PowerAutomate there is a empty() function that can be used, but it doesn't work the way you think.  Take the following example from a mentee question:


In this Set variable action, we are trying to set varFundDateExists to true or false depending on if there's a value in the "RD Funded Expiration Date" control.  The attempt used here is:

@not(empty(items()?['RD_x0020_Funded_x0020_Expiration_x0020_Date']))

Unfortunately, the empty() function doesn't work as expected.  How do we solve this problem then?

I've seen this suggested solution on powerusers.microsoft.com where doing a date calculation allows you to determine if the target date field is blank:

Value(Today()) - Value(items()?['RD_x0020_Funded_x0020_Expiration_x0020_Date']) = Value(Today())

The theory is that if there is a date in the target field, the value won't match today's date and return false.  The exception to this is when the target field contains today's date in which case it will return true.

The best way to do the check is as follows:

Equals(['RD_x0020_Funded_x0020_Expiration_x0020_Date'], null)


Happy coding...
C


02 December 2020

SharePoint Remote Event Receivers List

Here is the complete list of Remote Event Receivers available in Microsoft.SharePoint.Client.EventReceivers.SPRemoteEventType:

 AppInstalled

AppUninstalling

AppUpgraded

EntityInstanceAdded

EntityInstanceDeleted

EntityInstanceUpdated

FieldAdded

FieldAdding

FieldDeleted

FieldDeleting

FieldUpdated

FieldUpdating

GroupAdded

GroupAdding

GroupDeleted

GroupDeleting

GroupUpdated

GroupUpdating

GroupUserAdded

GroupUserAdding

GroupUserDeleted

GroupUserDeleting

InheritanceBreaking

InheritanceBroken

InheritanceReset

InheritanceResetting

ItemAdded

ItemAdding

ItemAttachmentAdded

ItemAttachmentAdding

ItemAttachmentDeleted

ItemAttachmentDeleting

ItemCheckedIn

ItemCheckedOut

ItemCheckingIn

ItemCheckingOut

ItemDeleted

ItemDeleting

ItemFileConverted

ItemFileMoved

ItemFileMoving

ItemUncheckedOut

ItemUncheckingOut

ItemUpdated

ItemUpdating

ItemVersionDeleted

ItemVersionDeleting

ListAdded

ListAdding

ListDeleted

ListDeleting

RoleAssignmentAdded

RoleAssignmentAdding

RoleAssignmentDeleted

RoleAssignmentDeleting

RoleDefinitionAdded

RoleDefinitionAdding

RoleDefinitionDeleted

RoleDefinitionDeleting

RoleDefinitionUpdated

RoleDefinitionUpdating

SiteDeleted

SiteDeleting

WebAdding

WebDeleted

WebDeleting

WebMoved

WebMoving

WebProvisioned

WebRestored


Happy coding!
C

SharePoint Remote Event Receivers are DEAD!!!

 Well, the time has finally come.  It was evident when Microsoft started pushing everyone to WebHooks, but this FAQ and related announcement...