Focal Point
multiple amper variable prompting

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1641005771

July 24, 2006, 01:22 PM
funsutton
multiple amper variable prompting
In the University, we deal with soemthing called Aid Years (eg. 0607 for 2006-2007) and Term Codes (eg. Fall, Spring, Summer: 200608, 200701....). Here is how a university year works:

0607 includes 3 Term Codes for Fall, Spring, and Summer: 200608, 200701, 200705 respectively.
0708 would include 200708, 200801, 200805.

In my report, instead of prompting someone for 1 Aid Year and 3 Term Codes, I'd like to just prompt them for the aid year, and fill in the Term Codes based on their selection. Is this possible using Webfocus?

Brian


-Brian

Webfocus v7.6.1 on Windows XP
July 24, 2006, 01:51 PM
<RickW>
I would try a DECODE something like...

DEFINE FILE CLASS
TERM1/A4=DECODE TERMCODE('200608' '0607', '200701' '0607', '200705' '0607', '200708' '0708', '200801' '0708', '200805' '0708' ELSE '9999');
END
TABLE FILE CLASS
PRINT PEEPS
WHERE TERM1 EQ &TERMVAR
END
July 24, 2006, 01:54 PM
Glenda
Try this code:

-SET &TERM1 = '20'||SUBSTR(4,&AIDYR, 1, 2, 2, 'A2')||'08';
-SET &TERM2 = '20'||SUBSTR(4,&AIDYR, 3, 4, 2, 'A2')||'01';
-SET &TERM3 = '20'||SUBSTR(4,&AIDYR, 3, 4, 2, 'A2')||'05';

TABLE FILE TABLENAME


Glenda

In FOCUS Since 1990
Production 8.2 Windows
July 24, 2006, 02:03 PM
Leah
I use defines to get distribution ids which relate to terms thusly:
RUNYEAR/A4 WITH STU_ID = '&YEAR';
YEARDIG/A1 = EDIT (RUNYEAR,'$$$9');
YEARNUM/I4 WITH STU_ID = &YEAR;
YEARPREV/I4 = YEARNUM - 1;
DISBA/A5 = '&YEAR' | '1';
DISBB/A5 = '&YEAR' | '2';
DISBC/A5 = EDIT(YEARPREV) | '4';
DISBD/A5 = EDIT(YEARPREV) | '3';
So for us if I pass 2007 (which you call 0607) you end up with 20063, 20071, 20072, 20074

You would have to convert your 0607
year/a1 = '20 | edit(awardear,'$$99');
to the equivalent of 2006 and then whatever you use for terms for the 'years'


Leah
July 24, 2006, 02:04 PM
Leah
quote:
Originally posted by Leah:
I use defines to get distribution ids which relate to terms thusly:
RUNYEAR/A4 WITH STU_ID = '&YEAR';
YEARDIG/A1 = EDIT (RUNYEAR,'$$$9');
YEARNUM/I4 WITH STU_ID = &YEAR;
YEARPREV/I4 = YEARNUM - 1;
DISBA/A5 = '&YEAR' | '1';
DISBB/A5 = '&YEAR' | '2';
DISBC/A5 = EDIT(YEARPREV) | '4';
DISBD/A5 = EDIT(YEARPREV) | '3';
So for us if I pass 2007 (which you call 0607) you end up with 20063, 20071, 20072, 20074

You would have to convert your 0607
year/a1 = '20' | edit(awardear,'$$99');
to the equivalent of 2006 and then whatever you use for terms for the 'years'



Leah
July 24, 2006, 02:16 PM
funsutton
Thanks everyone for responding. Glenda, your code works flawlessly - especially since I have over 35 different reports in my one procedure.


-Brian

Webfocus v7.6.1 on Windows XP