Error message in data scope

System.IndexOutOfRangeException: Index was outside the bounds of the array. at Namespace_1f9e.Main_Expressions.Main_Expressions_TypedDataContext4_ForReadOnly.__Expr17Get()
at Namespace_1f9e.Main_Expressions.Main_Expressions_TypedDataContext4_ForReadOnly.ValueType___Expr17Get()
at Namespace_1f9e.Main_Expressions.InvokeExpression(Int32 expressionId, IList1 locations, ActivityContext activityContext) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.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, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

@naveen5,

Your code is trying to read data outside of the data like, you have array with 4 items but code is trying to get 10th item or something beyond 4.

Check the code once again.

Thanks,
Ashok :slight_smile:

Hi @naveen5

Check the size of the array

variable1.Length