If you have PowerShell support in your UC4, this PowerShell logic generates and displays a new GUID:
$Guid = [guid]::NewGuid()
write-host "GUID:$GUID"
Or if you just need a unique identifier and GUID format is not important, I usually use &$runid#. The UC4 RUNID is a 10 digit integer and is guaranteed to be unique for the UC4 environment you are running in. It also has the additional value of giving you a tie-back to "what UC4 job generated me?"