Emailcount

Hi, In this activity I am counting the number of emails existing in a profile. This assign activitiy is worked fine. Now I have loop through it and that if the email is exciting more than one.
Now I added the Add Data Row inside the loop and I want to give a , if my email is existing more than one than I want to use , so can you let me how to declare this condition in a Add date row activity.
@Palaniyappan plz help

image

image

Hi @balkishan,
If you are operating on String type variables you will be not able to add DataRow to it.
image
Add Data Row activity is working only with:
image

1 Like

Fine lets do one thing
instead of validating the email that occurs twice or thrice, lets remove those duplicates even before getting to the for each loop
–you have the assign activity the split method on right side that would give a output of type array of string to a variable name emailcount
–now use another assign activity like this
emailcount = emailcount.Distinct().ToArray
this will remove the duplicates in it
–now use a for each loop and pass this variable emailcount to this loop and change the type argument as string in for each loop property
but not emailcount.ToString just emailcount because its an array variable and not a string variable buddy
–thats all you are done.
Cheers @balkishan

1 Like

I am counting @ from the the Regex Match expression. So this emailCount is counting the number of times occurence of @ from the Regex text. And I have to use a loop so what to do?

one min
can i have a view on that split expression once if possible buddy
Cheers @balkishan

1 Like

It’s count the occurrence of @
If it count one so my email is exisiting one time if two then two times like that.

image

Fine
may i know what is your scenario
Cheers @balkishan

1 Like

emailcount is a integer type not array bro?

My scenario is I have to copy the email id but for some candidate is is existing one time and for some two and for some three like that.
I want to copy this into the excel columns in a single row only,
like abc@gmail.com, efg@outlook.com like that bro.
image

here it’s two times email id.
image

so like that exisiting for the diff profile. Hope you got it bro

1 Like

Fine i got the scenario, yu want to store email in a single row
for that we are checking either one mail id or two mail id…
so for this may i know what procedure you have so far buddy
Cheers @balkishan

1 Like

Bro, which I shared with you…count @ number of times exist.