Check if values in datatable are unique

it seems that it is an easy problem, but what could be the solution?

Hello @abdel

Do you only need check or get the unique values even if it contains repetition?

check if it contain distinct values for exe:

image

Check if the Last column conatin Ditinct element despite theire value:

Check if the Last Colum contain only “PAIE REEL PRC/T”

@abdel

You can try the example below:

listOfString = dt.select.AsEnumerable().Select(Function(x)x(“PAIE REEL PRC/T”).tostring).Distinct.Tolist

If listOfString.count > 1 then

Not is unique

else

Is Unique

End If

Let me know if it working, I have try and it’s working.

Hope it Helps

1 Like

hi dkollyns,

i had the following error: comlumn “PAIE REEL PRC/T” did not belong to the datatable (which is scrapped):
image

i need to check if in the datatable there is only “PAIE REEL PRC/T” repspectively in Column3, 4, 5

@abdel
When do you perfoms the extraction, the Columns DataTable isn’t Default?

yes they are default

Ok, So on first screen shot sent for you, there’s juts one column with the value “PAIE REEL PRC/T”, and now you have 3 columns with part of values.
which the example is correct? it’s not clear for me.

The Last one is the result of screen scrapping wizard:

when i click on generate datatable it gives:

Can you send your workflow?