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! Go to 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!
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:
Whereas, if the choice is cleared first and the invalid address is added afterwards, I get an error message:
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
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]))
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |