Error Option Strict on disallows late binding when using UiPath Framework

Hi,

I have an array “WIList” that needs to be processed using the UiPath Framework; but I am getting the error “Option Strict on disallows late binding” when assigning the element of the array to an Item, as per the following image.

Any help would be appreciated.

Thanks!

1 Like

Hi
The datatype of array and the In_TransactionNumber should match
if he array is of type string, then mention as In_TransactionNumber.ToString
and try once
and moreover the type of out_TransactionItem is a datarow, so we need to make sure we are assigning it with a value of type datarow, but WList is a array
Cheers @mesalcan

@Palaniyappan
I have changed the type with “ToString”; but still getting the same error.

A bit of background.

WIList is the result of a select within a DataTable, I need to process each one of the elements of WIList using the UiPath Frameworl (I am learning how to use it). So, out_TransactionItem is each one of the objects of the array and I can have a new transaction only if the transaction number (in_TransactionNumber) is less than or equal to the index of the array element.

Thanks!

1 Like

I hope the type of WIList is array of datarow
Kindly check that once @mesalcan

Yes, WIList is an array of DataRows @Palaniyappan

1 Like

Fine then it should work actually
Let’s do one thing may be looks weird
Remove that assign activity and place a new assign activity and try to mention the left side value first with WIList(in_TransactionNumber) and right side next with Out_TransactionItem

But make sure that the type must match and if they match it will work sure
Like
Out_TransactionItem = WIList(in_TransactionNumber)
Datarow = Array of Datarow (index in int32)

Kindly try this and let know
You were almost done
Cheers @mesalcan

Not sure I am understanding you. What do you mean with Datarow = Array of Datarow(index in int32).

And if I use out_TransactionItem=WIList(in_TransactionNumber) I get the “error option strict on disallows…” error

Thanks!
@Palaniyappan

Good
what was the error that popup up
if possible can i have a screenshot
Cheers @mesalcan

The screenshot is within my first comment in this post.

Thanks! @Palaniyappan

It seems I had an issue with the DataTypes that seems to be solved. Now I am getting the below error.
“WIID” is one of the columns in the row of “out_TransactionItem”

1 Like

For this
Fine we need to mention like this
because we cannot mention a column name in datarow variable
either we need to use a datatable variable like this
out_TransactionID = io_TransactionData(“WIList”).ToString
Cheers @mesalcan

That’s excellent; but at this stage I do not have a datatable though. What I have is an element (out_TransactionItem) of a DataRow array (WIList), from where I need to extract one of the values (WIID).

Thanks!

I figured this out. My datatypes were wrong WIList should be DataRow and out_TransactionItem should be DataRow.

Thanks!