Guid.From

The function returns a Guid.Type value based on the input value. If the input value is null, the function returns null as well. It includes a validation process to ensure the input value is in the cor...

Syntax

Guid.From(value as nullable text) as nullable text

About

The function returns a Guid.Type value based on the input value. If the input value is null, the function returns null as well. It includes a validation process to ensure the input value is in the correct format, with examples of acceptable formats provided.

Explanation

The Guid consists of 32 hexadecimal digits which can be displayed in different formats based on how it is inputted in Power Query M. Example 1: Input: MGuid.From("05FE1DADC8C24F3BA4C2D194116B4967") Output: "05fe1dad-c8c2-4f3b-a4c2-d194116b4967" Example 2: Input: MGuid.From("05FE1DAD-C8C2-4F3B-A4C2-D194116B4967") Output: "05fe1dad-c8c2-4f3b-a4c2-d194116b4967" Example 3: Input: MGuid.From("{05FE1DAD-C8C2-4F3B-A4C2-D194116B4967}") Output: "05fe1dad-c8c2-4f3b-a4c2-d194116b4967" Example 4: Input: MGuid.From("(05FE1DAD-C8C2-4F3B-A4C2-D194116B4967)") Output: "05fe1dad-c8c2-4f3b-a4c2-d194116b4967"