Removing 'The' from start of string. Exception encountered

Hello,

I’m running a process using the below If statement.

Image1

It works fine within one part of the process (Update Invoice Data) but when i use it again in another part of the process it fails (Update Country Data). I receive the following message:
Source: Assign
Message: Index and length must refer to a location within the string.
Parameter name: length
Exception Type: System.ArgumentOutofRangeException

Details:
19.3.0+Branch.master.Sha.5fdb43627d7d3c011018bb545ddf9470210d44a9

Source: Assign

Message: Index and length must refer to a location within the string.
Parameter name: length

Exception Type: System.ArgumentOutOfRangeException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length

  • at System.String.Substring(Int32 startIndex, Int32 length)*
  • at lambda_method(Closure , ActivityContext )*
  • at Microsoft.VisualBasic.Activities.VisualBasicValue`1.Execute(CodeActivityContext context)*
  • at System.Activities.CodeActivity`1.InternalExecuteInResolutionContext(CodeActivityContext context)*
  • at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity`1 expressionActivity)*
  • at System.Activities.InArgument`1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)*
  • at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)*
  • at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)*
  • at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)*
  • at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)*

Any assistance on how to fix would be greatly appreciated.

FAME Validation.xaml (75.9 KB)
CosOver5Employees_UKEir.xlsx (20.5 KB)
Invoice Data.xlsx (676.9 KB)

3 posts were merged into an existing topic: Removing ‘The’ from the start of a string