Need help to find whether it is duplicated in the same column for a new entry

Hi, I’m quite a newbie in UiPath, trying to test my first project.

I have a Google form which will convert to Google Sheets for the entries from users.
Need to check whether one of the new entry is duplicated or not compare to the value of other row in the same column.

For example, if a new entry of username in the new row is duplicated to the other row in column “username”, then a message box will popup to warn user to change the username.

I know the basic concept of GSuite Application Scope, but a step by step instruction will be very helpful for a newbie like me.


This is just a way to do that @johocen

  1. Read the excel and store the values in a data table
  2. Get the row count and store in a variable
  3. Declare and initialize a array of length row counts which you get in step 2
  4. Then iterate the data table and store all the values to the array by passing the index. To pass the index, declare a variable of type integer and then increment it in the for each row activity and pass that integer value as the index of the array
  5. Then check if the value exists using array.contains(“new value”)

Hi @HareeshMR Thanks for the help, but sorry to ask more.

Followed your instructions as below, but not sure about point 4.

  1. Read Range > Output as dt
  2. Assign rowCount variable type: int32 = dt.Rows.Count
  3. Assign arrayRowCount variable type: int32 = {rowCount}
  4. For Each Row in dt > ? Should I use Add To Collection to store all the values to the array? Can you elaborate more detail or a xaml sample will be appreciated.
  5. If arrayRowCount.contains(“new value”) Then / Else

Yes , go with add collection , you don’t need to pass the index also. That will the better option than arrays @johocen

You are almost done, forget about arrays here. Go with collections