toguid()

文字列を guid スカラーに変換します。

Note

可能な場合は、代わりに guid リテラルを使用します

構文

toguid(toguid()

構文規則について詳しく知る。

パラメーター

名前 必須 説明
value スカラー (scalar) ✔️ guid に変換する値。

戻り値

変換プロセスでは、適切に配置されたハイフンを無視して入力の最初の 32 文字を取り、それらの文字が 0-9 または a-f の範囲のものであることを検証してから、文字列を guid スカラーに変換します。 残りの文字列は無視されます。

変換が成功した場合、結果は guid スカラーになります。 それ以外の場合、結果は null になります。

datatable(str: string)
[
    "0123456789abcdef0123456789abcdef",
    "0123456789ab-cdef-0123-456789abcdef",
    "a string that is not a guid"
]
| extend guid = toguid(str)

出力

str guid
0123456789abcdef0123456789abcdef 01234567-89ab-cdef-0123-456789abcdef
0123456789ab-cdef-0123-456789abcdef 01234567-89ab-cdef-0123-456789abcdef
guid ではない文字列