Serouche, I would use a regular form to hold each of the banned email addresses, as suggested by Norm. Besides making it easier to search using a regular form allows for easy updating. You could also delegate the responsibility for maintaining the content of this form to someone else.
In a set of active links loop through each email address the user entered in the $CC List$ field. Use a Set Fields command to search the new BannedEmailAddress form to see if the address is found. If found, then display a message to the user. To loop through each email address in the $CC List$ field test for the separator (space, comma, semi-colon, etc.) in the Run If qualification. Use a Set Fields with the LEFT() and STRSTR() functions to extract out a single email address to a temp field. For example, AL1 - Execution Order 1 Run If: blank If Action 1: Set Fields the value of $CC List$ to $zTmp Char1$ AL2 - Execution Order 2 Run If: 'zTmp Char 1' LIKE "%,%" If Action 1: Set Fields the value of RTRIM(LTRIM(LEFT($zTmp Char 1$, STRSTR($zTmp Char 1$, ",")))) to $zTmp Char 2$ If Action 2: Set Fields the value of RTRIM(LTRIM(SUBSTR($zTmp Char 1$, STRSTR($zTmp Char 1$, ",") + 1))) to $zTmp Char 1$ Else Action 1: Set Fields the value of RTRIM(LTRIM($zTmp Char 1$)) to $zTmp Char 2$ Else Action 2: Set Fields the value of $NULL$ to $zTmp Char 1$ AL3 - Execution Order 3 Run If: 'zTmp Char 2' > "" If Action 1: Set Fields from the BannedEmailAddress form with 'Email Address' = $zTmp Char 2$ ...the Request ID of the matching BannedEmailAddress record is stored in $zTmp Char 3$ AL4 - Execution Order 4 Run If: 'zTmp Char 2' > "" AND 'zTmp Char 3' != $NULL$ If Action 1: Message of Address $zTmp Char 2$ is banned. If Action 2: Goto 1000 AL5 - Execution Order 5 Run If: 'zTmp Char 1' != $NULL$ If Action 1: Goto 2 The above example uses the comma as the separator. You could use the REPLACE() function in AL1 to change spaces, semi-colons, etc into commas. HTH Stephen Remedy Skilled Professional -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Serouche Rahimpour Sent: Thursday, September 06, 2007 3:26 AM To: arslist@ARSLIST.ORG Subject: Re: how to read the whole content of a drop-down menu Hi, sorry my concern lead everyone into confusion. So I'll try to explain my problem from scratch and in a simple way. I have a form let say A. In that form I have a character field called CC list. People can add logins in that field so each login corresponds to an email address. What I want to do is simply: do not allow people from putting in that field some logins. These later are mailing-lists. So I though I could put all these mailing-lists in a file and read from that file and compare with what is typed in. ... At this point I make it short because I tried different solutions either form myself or solutions given by you gentlemen of this list. ... Anyway, the problem I have at the end is my SET FIELD does not work if I use something like (("%" + $CC list) + "%") LIKE 'My Mailing-list' No matter if 'My Mailing-list' is stored as a file and red in a form through a menu. Or if 'My Mailing-list' is a form with for every mailing-list a record. .... Also no matter how I write the SET FIELD . i.e it also doesn't work if I write 'My Mailing-list' LIKE (("%" + $CC list) + "%") ... I hope I was clear enough. ... Any help/idea/suggestion will be very welcomed. ... I am about to try the solution given by Fred Grooms with 2 tempfields. ... Serouche Shellman, David wrote: > Serouche, > > I think your original question may have lead all of us down a path that > works but is becoming increasingly difficult. One of your recent > statements has made me rethink your original question. If I understand > correctly, you want folks to be able to populate a field from a menu but > you don't want them to be able to type in to the field. > > Have you tried setting the Display Type on the field to Drop-Down List? > This sets up the menu in a manner that prevents individuals from typing > directly in the field. > > Dave > > ________________________________________________________________________ _______ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are" _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"