@ismember problem

Hello,I have a filed named EmailAddress which contains text list; I want to find whether a specific email address is contained in this field. So I used @ismemeber to check the value, however, it always returns 0, even though I can see that specific address is contained in this field. Do you know where I was wrong? Thanks.

For example,

I check the doc properties and find out the field EmailAddress contains following text:

“Fname1 Lname1#ab1-c1-d1@abc1.com”

“Fname2 Lname2#ab2-c2-d2@abc2.com”

…

if I use the formula in the view column as:

@ismemeber(“Fname2 Lname2#ab2-c2-d2@abc2.com”; EmailAddress)

It always returns 0.

Thank you in advance.

Subject: @ismember problem

Also note that @IsMember can be replaced by ‘=’ which is a membership test when the right hand side is an array

i.e.

@If(“Fname2 Lname2#ab2-c2-d2@abc2.com”= EmailAddress;

“Happiness” ;

“Sadness”)

Subject: @ismember problem

Have you checked to see that variable EmailAddress is a text array ?@isMember compares text string to each element of text array exactly, so extra spaces will cause a problem.

Try using @trim on both arguments.

@ismember(“Fname2 Lname2#ab2-c2-d2@abc2.com”; @trim(EmailAddress))

to see if your array elements ahve xra spaces that are causing a mismatch.

Subject: @ismember problem

do you need to use @IsMember? I usually have better results with @Contains and just to avoid further issues I will usually use @LowerCase or @UpperCase to avoid case issues.

Subject: RE: @ismember problem

@Contains doesn’t work either. Always 0;I don’t have uppercase or lowercase problem, since I copy the substring from the value.

Any idea?

Subject: RE: @ismember problem

you must have some other problem then. I tried both solutions, @Ismember and @Contains both return 1 for me in my view column