[Download-List] FW: Download question regarding the use ofEVALwith a multi-valued field.

Brian McGuire bmcguire at gcu.edu
Mon Sep 19 15:18:13 EDT 2005


I concur that this might be better for what Maggie appears to want.
Brian

-----Original Message-----
From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of George W
Ohlandt
Sent: Monday, September 19, 2005 5:14 AM
To: Cedarville DOWNLOAD Users
Cc: msteyn at niagara.edu
Subject: RE: [Download-List] FW: Download question regarding the use
ofEVALwith a multi-valued field.

Brian,

INDEX would still 'see' it.

INDEX returns the character position of the string being searched for.
The third parameter tells which occurrence of that string to return the
position for.  In the example below, we are just 
looking to see if it is in there anywhere, so we are looking for the 1st
occurrence.

If you only wanted to check the first 5 values, you could throw in a
FIELD function to make the search string contain only the first 5 values
of N12.FRUIT.

DOWNLOAD STUDENTS @ID N12.FRUIT NUM.VALUES 5 EVAL "IF
INDEX(FIELD(N12.FRUIT, at VM,1,5),'APPLES',1) THEN 'APPLES' ELSE ''" EVAL
"IF INDEX(FIELD(N12.FRUIT, at VM,1,5),'ORANGES',1) THEN 'ORANGES' ELSE ''"

George

George W. Ohlandt
Director for Admissions
Office of Enrollment Management
Medical University of South Carolina

--On Friday, September 16, 2005 11:11 AM -0700 Brian McGuire
<bmcguire at gcu.edu> wrote:

> That sounds like it would work.  What would happen if there were 10
> values in her fruit list and values 1-5 were not apple, but value 7
was?
>
> Brian
> Dir Inst Research
> Grand Canyon University
>
> -----Original Message-----
> From: download-list-bounces at cedarville.edu
> [mailto:download-list-bounces at cedarville.edu] On Behalf Of George W
> Ohlandt
> Sent: Friday, September 16, 2005 9:56 AM
> To: Cedarville DOWNLOAD Users; Maggie Steyn
> Subject: Re: [Download-List] FW: Download question regarding the use
> ofEVAL with a multi-valued field.
>
> Maggie,
>
>   Try INDEX with multi-valued fields instead of LIKE
>
> DOWNLOAD STUDENTS @ID N12.FRUIT NUM.VALUES 5 EVAL "IF
> INDEX(N12.FRUIT,'APPLES',1) THEN 'APPLES' ELSE ''" EVAL "IF
> INDEX(N12.FRUIT,'ORANGES',1) THEN 'ORANGES' ELSE ''"
>
> George
>
> George W. Ohlandt
> Director for Admissions
> Office of Enrollment Management
> Medical University of South Carolina
> 843.792.3813
> ohlandtg at musc.edu
>
> --On Friday, September 16, 2005 12:28 PM -0400 Maggie Steyn
> <msteyn at niagara.edu> wrote:
>
>>
>>
>>
>> I didn't receive any feedback from anyone when I sent this earlier,
so
> am re-broadcasting this. I would appreciate
>> any suggestions.
>>
>> I am trying to 'sort' the order of the values in a multi-valued field
> so that all of the 'APPLES' values will be in one column, all of the
> 'ORANGES' values in the next etc. (The Fruit values, of
>> which I can have up to 5, could have been loaded into the STUDENTS
> file in the multi-valued field in any sequence.)
>>
>> DOWNLOAD STUDENTS @ID N12.FRUIT NUM.VALUES 5 EVAL "IF N12.FRUIT LIKE
> '...APPLES...' THEN 'APPLES' ELSE ' '" EVAL "IF N12.FRUIT LIKE
> '...ORANGES...' THEN 'ORANGES' ELSE ' '"      ....etc
>>
>> I am not getting any values returned in my EVAL fields. (I've tried
> exchanging LIKE for EQ & removing the ' ...'s but the results are the
> same.)
>>
>> Is EVAL on a multi-valued field supported in DOWNLOAD ?
>>
>> Thank you for your help.
>>
>> (We are using Download Version 7.11.)
>>
>> Maggie Steyn
>> Application Analyst
>> Information Technology Department
>> Niagara University
>> msteyn at niagara.edu
>> Phone: (716) 286-8651
>> Fax: (716) 286-8045
>>
>>
>
>
> _______________________________________________
> download-list mailing list
> download-list at cedarville.edu
> http://mail.cedarville.edu/mailman/listinfo/download-list
>
> _______________________________________________
> download-list mailing list
> download-list at cedarville.edu
> http://mail.cedarville.edu/mailman/listinfo/download-list
>
>


_______________________________________________
download-list mailing list
download-list at cedarville.edu
http://mail.cedarville.edu/mailman/listinfo/download-list




More information about the download-list mailing list