Error getting the file ID after uploading a file to Google drive due to Property 'ID' is 'ReadOnly'

Dear all,

Actually this sounds really simple but it doesn’t work for me. I upload a file to GDrive and what to get back the file ID. The Upload works and if the output is just a variable like “upload” the output is UiPath.GSuite.Drive.Models.Spreadsheet.Remoteeltern. But if the output is upload.ID there is this error:

The variable type is:

Does anyone know how to solve the readonly issue?

Hi @on_and_on

Clear the Output field

Press ctrl + k and create new variable to hold the result without mention any properties

For example

UploadedFile

This variable store information about the first file that was uploaded.

To check a list of properties that you can use, execute the workflow in n debug mode and step in

When this activity executed, go to Locals Panel and expand the variable UploadedFile

we would assume the following derived only from the sceenshots

the Variable uploadID is of DataType: GdriveRemoteItem
the class GdriveRemoteItem has defined a Property ID, which is only Readonly

The configured Assignment First Uploaded File= upLoadID.ID is assigned to set the activity output to the Poperty ID. But this ID is a ReadOnly Propety and we cannot use to let receive a value.

Therfore we got this compiler Issue message

we would do as mentioned

for variable names we recommend to use descriptive own names which are different to any keywords, classnames etc.

@on_and_on

You have to use variable uploadID in the output field

And then in the log message use uploadID.ID …and you should be getting the id output

Cheers

Dear all, thank you very much for your fast response. This settings solved my problem:

1 Like

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