Level 3 training Main excercise 2 GetWorkItems returning null data table


I’ m having some issues with the excercise. I’ve followed the problem back to the GetWorkItems sequence. Which Extracts structured data (all of the work items unfiltered and should put the result into a datatable variable which I have created, so why doesn’t it???!!!)


properties for the Extract data activity with the output going to dtWorkItems


Here is the variable definition

When I run the work flow in debug mode dtWorkItems shows as null in the locals window

I added a write range to excel activity to see the contents of the data table but as it’s null there isn’t a lot of joy there.

Here is the xaml if anyone can give me a clue please.

System1_GetWorkItems.xaml (8.5 KB)

I can see the extract going through the webpages until the last one so it should be picking up the data and the output datatable is there also (so what is going wrong?)


I did little bit change and it’s working

add this to your variable


in the Vb expression part

1 Like

@Jersey_Practical_Sho. Thanks very much for the info putting that default value in enabled me to write range to excel (first column is blank don’t know why but at least there is now data there).

Do you know why this New Datatable default has to be added. Is it becasue it is an object rather than just a normal variable (most variables don’t need a default when they are created so why does this?) .

@irahmat could you please let me know what you did to get the workflow working.

@Jersey_Practical_Sho suggested to add New System.Data.Datatable to the ExtractDataTable definition but I’m not sure why this is necessary.

Maybe you did something different I’m not sure from your post what you did.

When I originally went through this exercise, I had exactly the same issue as yourself. So I Started over from the very beginning of the Scraping process and the system added New System.Data.Datatable in when I completed the extract data table part.

1 Like

Exactly, that just what I did.

Thanks guys hopefully I’m one step nearer to finishing this excercise

I am literally at the point just after you and now Im stuck on the Assign part or moreover where it goes. Ill add you as a friend on here and see how we get on?

Thanks Jersey good luck, of course I’ll let you know if I have any insights.

1 Like

please be careful of white space. Always use trim on the string. because u will don’t know the result will be same as their expected or not.


Thanks @irahmat for the info I think I had to do some regex (and I don’t know anything about regex I found an example in the forum somewhere so that the result would only allow letters and numbers to get rid of non printable characters like newline that wasn’t being removed by the trim function)

The split part finds the text between Client ID: and Client Name: (it takes the array index (1) )
The regex bit only allows characters and numbers so hidden characters are removed.
system.Text.RegularExpressions.Regex.Replace((Trim(AllWIDetails.Split({“Client ID:”, “Client Name:”}, StringSplitOptions.None)(1))), “[^a-z A-Z 0-9]”, “”)

I got the basis of this from the forums (I couldn’t find this material in any UiPath learning materials, which I think it should be if in the walkthrough it basically says

I don’t think that this was covered sufficiently in the learning materials (In my opinion).

As for the assign you need to create a out argument and then assign the datatable to it (it’s in my xaml from the first post, if that’s the assign you’re talking about)

This was the assign I was talking about

That select returns an array of data rows (I thought initially it returned a table so my WIList was a datatable variable which was wrong).

So you’ve sorted that now right?

I have that assignment after System1_Close Workflow in the init. However I have other issues with transaction items which I’m composing now

This is what I have so and it works, set it as an argument so that it can be used globally

its from there on that im stuck, here on

Yes I agree this is a very badly described section and where my process is messing up too. I’m writing out a post with my issue.

1 Like

This is the new post with my gettransactiondata workflow (in the post)

1 Like