Datatable "Constrained to be unique" error

I have created an automation on an app called telegram which scrapes users from one group by taking their username and adding it to a data table, it then adds all those users onto my group on telegram.

I am using a selector to increment (something like idx=‘i’) though the users.

Everything is working PERFECTLY! However, when I email the automation folder to my self and set it up on another computer I start getting an error when it’s scraping the usernames and adding them to the data table:

I am positive that the data is not duplicated because of my logic, and the fact that the same automation works perfectly on my other computer.

What I tried:

  1. Checking unique check box on the build data table activity

  2. Unchecking it - because UIPath thinks its duplicated, when its not. SO I though this would work, but it didn’t, because it will not add be adding the data to new rows anyways. And it ends up returning a blank data table.
    You see what I mean?

  3. Changing up logic on the computer which the automation seems to be having problems with data tables. However, I can’t find a way around it.

Therefore I am convinced that this might be a bug with data tables or something? anyone have any advice or suggestions?

Are you sure the usernames are not repeating?
As per the error message, the usernames are repeating.

I recommend you to debug the add row functionality.
Print in the output panel every username you are trying to add. May help you in debugging fast.

Check in case if you two Add Row activities are executing.

Regards,
Karthik Byggari

1 Like

But either way, it is working perfectly on one computer and the exact same thing is not working on another?

That’s a strange behavior.

That is why I asked you to print user name in the output panel before adding into a row and check if username is getting duplicated.

Or add an extra check, if username already exists in the data table before adding into a data table as a precautionary step.

Regards,
Karthik Byggari

1 Like

ok I will try this out later.

Alternatively I could just use excel instead of data tables, right?

Yes. You can use it.
Data tables and excel both are same.
Benefit of excel is you can store it locally and lookout later for any issues.

Regards,
Karthik Byggari

1 Like