RSS

What does the /:x: and /r mean in SharePoint Online sharing URLs?


Ever wondered what the new SharePoint Online URLs are all about?  Take for example https://cjvandyk.sharepoint.us/:x:/r/sites/Site1...
What exactly does the /:x: and the /r between the domain and the /sites mean?  Well wonder no more...

/:b: PDF
/:f: Folder
/:i: Image
/:o: OneNote
/:p: PowerPoint
/:t: Text
/:u: Undefined
/:v: Video
/:w: Word
/:x: Excel

Happy coding...
C

Extensions 2.0.1 Major version update released!


On Friday morning a major version update of Extensions was released.  The new version brings with it a TON of new extension methods for C# such as:

  1. Most notable is the .Save() and .Load() methods added to the System.Object class.  This allows any object to be serialized to and from disk very rapidly e.g.:

    (object)MyClass.Save(<FilePath>);

    and

    (MyClassDefinition)MyClass = (object)MyClass.Load(<FilePath>);

  2. A series of extensions was added to the System.Double class allowing any number cast as a double to be quickly converted between binary data sizes e.g.:

    double SizeInTB = 2;
    double SizeInKB = SizeInTB.ToKB(Constants.NumberByte.TB);

    Which will return 2,147,483,648 i.e. the number of KB in 2 TB.

  3. A series of extensions was added to both the System.String and Sytem.Text.StringBuilder classes that make it easy to validate strong passwords e.g.:

    string MyPassword = Console.Readline();
    if (MyPassword.IsStrong())
    {
        //Pass.  Input is a strong password.
    }
    else
    {
        //Fail.  Input is NOT a strong password.
    }

    Even better is if you want to exclude say symbols or special characters requiring users to only use upper case, lower case and numbers, you can override the default parameters e.g.:

    if (MyPassword.IsStrong(true, true, true, false))

    The component methods of .IsStrong() can also be used independently e.g.

    MyPassword.HasUpper()
    MyPassword.HasLower()
    MyPassword.HasNumeric()
    MyPassword.HasSymbol()


  4. A series of extensions was added to both the System.String and Sytem.Text.StringBuilder classes that make it easy to validate if a string is a valid US Zip code e.g.:

    MyString.IsZipCode()

    The method handles both 5 digit and 9 digit zip codes.

  5. Extension methods was also added to make other string based operations easier e.g.

    MyString.IsLower()
    MyString.IsUpper()

  6. Extension methods from previous versions were enhanced by adding the option to ignore white space as part of these methods:

    MyString.IsAlphabetic()
    MyString.IsAlphaNumeric()
    MyString.IsNumeric()

  7. On the lighter side of things, if you've ever wondered what it was like to live in the Morse Code era, you can leverage to silly methods to see for yourself like this:

    "My message I want to send".ToMorseCode().MorseCodeBeep();

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

Extensions enhancement - RemoveExtraSpace() method added


The .RemoveExtraSpace() method was added to both the System.String and System.Text.StringBuilder objects.  It allows the quick removal of extra space in the entire string.  It will remove all leading as well as trailing white space in addition to ensuring that only single space is used throughout the string e.g.

"    string truth = \"https://blog.cjvandyk.com   ROCKS !!!   \"".RemoveExtraSpace()

will return

"string truth = \"https://blog.cjvandyk.com ROCKS !!! \""


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

Extensions enhancement - IsVowel() method added


The .IsVowel() method was added to the System.Char, System.String and System.Text.StringBuilder objects.  It allows the developer the ability to check a substring for a vowel e.g.

"https://blog.cjvandyk.com ROCKS!!!".SubString(10, 1).IsVowel()

will return True because it's checking the "o" while

"https://blog.cjvandyk.com ROCKS!!!".SubString(11, 1).IsVowel()

will return False since it's checking the "g".


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

Extensions enhancement - IsZipCode() method added


The .IsZipCode() 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 in valid US zip code format e.g.

"12345".IsZipCode()

will return True as will

"12345-6789".IsZipCode()

but this

"12345678".IsZipCode()

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

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

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

PowerApps, PowerAutomate and PowerPlaform URLs


 Here are the PowerPlatform links for GCCHigh, GCC and Commercial M365:

EndpointGCCHigh LinkGCC LinkCommercial Link
PowerAppshttps://make.high.powerapps.ushttps://make.gov.powerapps.ushttps://make.powerapps.com
Power Automatehttps://high.flow.microsoft.ushttps://gov.flow.microsoft.ushttps://flow.microsoft.com
Power Platformhttps://high.admin.powerplatform.microsoft.ushttps://gcc.admin.powerplatform.microsoft.ushttps://admin.powerplatform.microsoft.com

Happy coding.
C

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


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