Select Distinct and then if found make some adding to the distinct file

Hi guys,

So first i need to select distinct some of my files. After that i need to add something like (.) in the last of the data.
For example
000000-005133-20171229-004792
000000-005133-20171229-004792
000000-005133-20171229-004792
000000-005133-20171229-004792
I have this set value and after i get the data using select distinct next i want to edit.
Like this
000000-005133-20171229-004792
000000-005133-20171229-004792.
000000-005133-20171229-004792.
000000-005133-20171229-004792.

At the end of the data need to adds (.).

Is there any way to automate this?

Thanks

Best Regards

Delf

Save your query results in a text file. Read text file and split by following Environment.NewLine condition.
Please use Split(entirePDF,Environment.NewLine)
this will give each line in an array(0) = “000000-005133-20171229-004792” + (.)
just append each array value with “.” and assign to a global variable in each iteration.

Hope my inputs are useful.

Hi @rkelchuri,

Still configuring what you mean but thanks for the reply.

Still confused bout using split . also about assign to global variable?

can you give me an example if its possible?

Thanks

Hi @delf,

create one String ->array of string variable (arrValue)

arrValue = entirePDF.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)

Hi @delf,
Try this one
use assign activity
To->myString
Value->myString.Replace(System.Environment.NewLine, "."+System.Environment.NewLine)

Regards,
Arivu

Just to clarify - dots at the end should be added only to duplicates (skipping first occurrence) or to all?

Hi @andrzej.kniola

Yes, it will be skipping first occurrence and adding dots at the end only for the duplicates ones.

Thanks

and also the result would be like this

Like this
000000-005133-20171229-004792
000000-005133-20171229-004792.
000000-005133-20171229-004792…
000000-005133-20171229-004792…

I dont know if i can do this. First im read the data using read range. after that using assign to select distinct file. After i get the distinct file what should i do?
im try using solution from @arivu96 but still with no avail results…

Thanks

So the your input is datatable???

Regards,
Arivu

Yes. My input is datatable

Thanks

Ok I thought your input is string.

Use for each row activity Loop through it
Inside use assign activity
Row("columnname")=Row("columnname"). ToString()+"."

Regards,
Arivu

Hi @arivu96

thanks for the reply,

still got an error. btw the syntax you gave to me will add (.) at the distinct data? or all the data in the datatable will be adds with (.)?

Thanks4

What exception are you getting??? @delf