Checking if entered value in EnumList is email

I have an EnumList that suggests email addresses as it’s value taken from another column. The EnumList allows other values, too. Is there some way to check the user’s entry for email address?

In my “Valid If” I have taken the following snippet from User Email authentication error:

However, if a “correct” (containing “@” and “.”) email address is already selected, the check for the individual entry will fail.

Screenshot of EnumList Type Details:

My Valid If expression:

Solved Solved
0 13 1,044
1 ACCEPTED SOLUTION

If EXTRACTEMAIL() recognizes only valid addresses, you could just use it as the entirety of the Valid If expression:

ISBLANK([_THIS] - EXTRACTEMAILS([_THIS] & ""))

Good call, @Suvrutt_Gurjar!

View solution in original post

13 REPLIES 13

Steve
Platinum 4
Platinum 4

Please post screenshots of the EnumList column configuration that includes the Type Details section, and of the complete Valid If expression.

both added to my post above

Well, I’m confused. I see nothing wrong with the screenshots you’ve posted. Could you post a screenshot demonstrating the problem and/or error?

The EnumList has an initial value. If I add an invalid email entry to that value, it goes through:

3X_b_8_b8026f2e8cecb1a31dda806a3e0aa6b07a6d3b87.png

Whereas, if the choice is cleared first and the invalid address is added afterwards, I get an error message:
3X_4_4_446c59fcfa37f735753ddbb8a3a4aafd97c2ac66.png

Hmmm… This may prove to be a big problem.

Note that a comma (,) is not explicitly disallowed by the Valid If expression. Perhaps try adding it?

But if I add NOT(CONTAINS([_THIS], “,”)) to the Valid If, it will prevent making several choices as (,) is the Item separator at the same time
3X_a_b_ab5414e6a8b4f15ca5544170b22b4a79e3456a8c.png

Perhaps the below valid_if expression could be tried

It assumes that the user adds emails through the ADD option in the enumlist dropdown button (Red box in the image below)

AND(
AND(COUNT([_THIS])=COUNT(EXTRACTEMAILS(TEXT([_THIS]))),
CONTAINS([_THIS], “@”),
CONTAINS([_THIS], “.”),
NOT(CONTAINS([_THIS], “!”)),
NOT(CONTAINS([_THIS], “#”)),
NOT(CONTAINS([_THIS], “$”)),
NOT(CONTAINS([_THIS], “%”)),
NOT(CONTAINS([_THIS], “^”)),
NOT(CONTAINS([_THIS], “*”)),
NOT(CONTAINS([_THIS], “(”)),
NOT(CONTAINS([_THIS], “)”)),
NOT(CONTAINS([_THIS], “?”)),
NOT(CONTAINS([_THIS], “`”))
)

That did the magic! (Little remark: the first “AND(” is redundant.)

Thank you so-so much!

Good to know it works the way you want. Yes, the first AND was a typo -my bad.

Please take a look at the help articles on the EXTRACT functions in general and EXTRACTEMAILS() in particular because the solution is based on EXTRACTEMAILS() function and solution’s accuracy will depend on that function’s accuracy in extracting emails from a list.

The valid_if expression basically validates that count of list elements in the field is equal to count of email elements in the list.

If EXTRACTEMAIL() recognizes only valid addresses, you could just use it as the entirety of the Valid If expression:

ISBLANK([_THIS] - EXTRACTEMAILS([_THIS] & ""))

Good call, @Suvrutt_Gurjar!

Beautiful!

this worked for mi 

ISNOTBLANK(EXTRACTEMAILS([EMAIL]))

Top Labels in this Space