Cant Fetch Record from entity in UiPath apps VB


I created variable with type as entity. I fetched record from query builder. But i am getting below error.

@RpaNoobMax ,

Best way is to go into Query builder and generate the script and then add FetchOne.

Try that and see if you are still getting any error.


@RpaNoobMax ,

Check below video once.

Hi @Arvind_Kumar1,
I followed your method only. I didn’t make any changes in code. I just changed fetch to fetchone.

For fetch function, I am able to store records in listSource Type variable. but if i convert fetch to fetchone, I get following error

  • Keyword does not name a type.

  • Tuple must contain at least two elements.

  • Array bounds cannot appear in type specifiers.

  • ‘)’ expected.

@RpaNoobMax ,

Make sure you are converting the same type of data into this.

Do you have list source app variable?

@RpaNoobMax ,

Just for your info, Fetchone will not work for list source. you need to use Fetch only.

Reason FetchOne Return an entity.

yes, I am able to fetch list of records and store it in a variable(Type ListSource)

But I am trying to store it in Entity Type only.
here, I am getting syntax error instead of mismatch Type.
it should work right if I change fetch to fetchone and store it inside entity type variable

@RpaNoobMax ,

Fetch and FetchOne will work for your entity type but for List source only Fetch will work.

I found the error. It was syntax. When I selected FetchOne, ‘Of(’ also comes with it. So
My code started with this - FetchOne(of(of . Instead of FetchOne(of

Fetch wont work with entity type - I got following Error -

Value of type ‘ListSource(Of VendorMapping)’ cannot be converted to ‘VendorMapping’

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