--- title: "Get Guid From String" slug: "get-guid-from-string" tags: ["GUID", "string"] updated: 2022-12-15T21:28:13Z published: 2022-12-15T21:28:13Z canonical: "documentation.decisions.com/get-guid-from-string" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Get Guid From String | ## Step Details | | --- | | **Introduced in Version** | 4.0.0 | | **Last Modified in Version** | 5.0.0 | | **Location** | Data > Text | The **Get Guid From String** helps to generate GUID from provided input. It also helps to convert the String input type to GUID type output. --- ## Properties #### Inputs | Property | Description | Data Type | | --- | --- | --- | | Value | Text to get GUID from | String | #### Outputs | Property | Description | Data Type | | --- | --- | --- | | Output | GUID formatted string | String | --- ## Example Inputs and Outputs | Input | Output | | --- | --- | | 625524a45ec33a0f53645a64600438b9 | 625524a4-5ec3-3a0f-5364-5a64600438b9 | | fdeMbdc9d9TbcMafdae9afTc9ca9eTbb | EXCEPTION MESSAGE | | ef5ec5bafdacefacfb5ccffcdccecbcafaac5cdfeafef | EXCEPTION MESSAGE | | Null Value | EXCEPTION MESSAGE | | Empty String | EXCEPTION MESSAGE | #### ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1671137477004.png) --- ## Common Errors ### Guid string should only contain hexadecimal characters If the input string contains characters other than hexadecimal characters, an error will occur. To resolve this, ensure that the input only contains the letters A - F and numbers 0 - 9. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps ---> System.FormatException: Guid string should only contain hexadecimal characters. at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result at System.Guid.Parse(ReadOnlySpan`1 input at System.Guid.Parse(String input at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- ### Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) If the input contains under or more than 32 characters, an error will occur. To correct this, ensure that there is only 32 characters. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps ---> System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result at System.Guid.Parse(ReadOnlySpan`1 input at System.Guid.Parse(String input at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- ### Value cannot be null If the input value is null, an error will occur. To resolve this, ensure that the value is correctly mapped/entered. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps ---> System.ArgumentNullException: Value cannot be null. (Parameter 'input' at System.Guid.Parse(String input at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` --- ### Unrecognized Guid format If the value is an empty string, an error will occur To resolve this, ensure that there is a value entered in the Value field. #### Exception Message: ```csharp Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps ---> System.FormatException: Unrecognized Guid format. at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result at System.Guid.Parse(ReadOnlySpan`1 input at System.Guid.Parse(String input at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value) --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace --- ``` ## Related - [Generating a Unique ID](/generating-a-unique-id.md) - [Put In Cache Using Generated Key](/put-in-cache-using-generated-key.md) - [Convert Base 64 String To Bytes](/convert-base-64-string-to-bytes.md)