Data Service document property retrieval error post Windows conversion

I am getting the following error when trying to access the document name after using the “Download File from Record Field” activity. This only started happening after I upgraded my project to the new Windows compatibility (which I’m now realizing was a mistake). In this instance, I have placed it in a For Each loop and the variable currentItem is set to the correct variable type for my Data Service in the loop.

This error prevents me from running the project. If I remove this activity and place a breakpoint right after it retrieves the file, I can go into the Immediate panel and run “currentItem.Doc.Name” which correctly returns the file name.

This is definitely a bug but I would like to know in the meantime how am I able to retrieve the name of the file from the Data Service?

Hi @mwsupra ,

I’ve also faced issues after converting my project to Windows, so I’ll try to help you out in whatever way I can.

First, when you trigger intellisense, does it show any data service related methods?
If not, then try restarting UiPath studio and see if that works. I’ve had to do this for one of my processes.

Second, try passing the variable into an Invoke Code and see if that is able to access the method, and if so the you can pass it out as an argument. If that doesn’t work, then try changing the DataService Package version or the imports and see if that helps.

Third, this is totally unrelated but I’ve noticed that you are using string operations to create directory paths.

Its better to use this instead->


But if you want the Downloads path directly, then this might also come in handy->


Kind Regards,
Ashwin A.K

Thank you for the helpful tips. I didn’t know about Path.Combine and that will definitely be easier to use in the future.

In regards to the bug, yes all of the proper and expected things come up in Intellisense so it is finding the property accurately. I think it is related to how it retrieves the property in the back-end which is not compatible with the new Windows converted project. It doesn’t say it can’t find the property but that it can’t find the method to retrieve the property – get_{propertyName}(). It can retrieve other properties from the Data Service entry just fine, but it cannot do this with the properties attached to a file received from the Data Service (Name, Path, Size, etc). When I attempt to retrieve any of these properties I get the same error.

I am on the latest version of the DataService at the time of writing this (2021.10.1) so with the version number being from last year I’m guessing there is a 2022 version in the works.

I’ve created a legacy Windows version of the project in the meantime which solves all problems. I would just like to make sure the bug is acknowledged so it can be fixed in an upcoming release.