Need help at Assignment 1 level 3!

Hello, i’ve been training ui path for 2 week.
Now i am doing the assignment 1, and i’m stuck at the step of getting WIID ID. i am confused at the datatype. here is my code. please give me some detail instruction for this. because i’m stupid and i really don’t know how to do next…

Hi @Zou_Barney

Welcome to the community!!

So here you are trying to assign the WIID from a datarow array to a string. Thats why you are getting this error. The reason is the datarow array has many records under wiid which you cannot assign to one string at once.

So you should have another assign activity on the top to get one row from the datarow array and get it assigned to out_transactionItem.

Out_transactionItem = DtrowVariable(In_transactionNumber)

Out_transactionItem should be of datarow type

Then use out_transactionItem to get the wiid assigned to out_transactionID

Out_transactionID = out_transactionItem(“WIID”).ToString

This will solve your problem

If this work for you, please mark my answer as the solution too :slight_smile:

1 Like

Here is my work,

Hi @Zou_Barney

Though this runs fine, considering the concept of the ReFramework and the steps you should follow in the walk through, there are few things that needs to be corrected.

  1. Invoking GetTransactionData

    here, the out_transactionitem should be of type DataRow. and it is the one that should be used to pass the value to process state. You also have not assigned it to TransactionItem variable

TransactionID is not supposed to be DataRow type. it should be String.

In GetTrasactionData.xaml file, there are few things to be done

Value assignment to out_TransactionItem is not done. In_WList(TransactionNumber - 1) should be assigned to it.

Out_TransactionID should be assigned with the WIID using out_TransactionItem

Out_TransactionID = out_TransactionItem(“WIID”).ToString

Within the Same IF condition, you have to have an assign activity to assign Nothing to out_transactionItem in the Else section.

So ideally, GetTransactionData.xaml should look something similar to this.



Thank your for your instruction, it was very helpful ! I finished the assignment 1,

Now i’m moving to the assignment 2.

Hi @Zou_Barney

if my answer helped you to fix your problem, please make sure to mark my answer as the solution too :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.