Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompt Based on List Of Values

Status
Not open for further replies.

sxschech

Technical User
Jul 11, 2002
1,033
US
New to Web Focus. A consultant set up a report for us that allows user to select terms. Unfortunately, the list is too big and confusing. We have a range of terms and there is also a situation where we need to report off of combined terms. Rather than having the user need to click on multiple terms, we were trying to see how we could set up the list so that the user could select the term or combined term once. Examples...

Currently the list would be something like:
Spring
Summer
Fall

User would need to click on Summer and Fall, but the way the consultant set up the parameter screen, these items are not sorted/near each next to each other as shown above.

Below is closer to what we'd like:

Spring
Summer
Summer/Fall
Fall

User would only need to click on Summer/Fall if they wanted to see the combined report data.

I created a procedure and hold file that filters down the data to the range of terms that we want the user to see, but not sure how to implement it into the actual report.

When I tried to edit the parameter prompt, the hold file "LOVTerms" does not show up.

I may be going about this the wrong way, but not sure how to proceed. The current parameter is based on an oracle sql table (view?) called LOV_ACADEMIC_PERIOD which contains all the terms.

Not sure how much code to put in, so showing the define I wrote and the consultant's parameter prompt.

Code:
DEFINE FILE LOV_ACADEMIC_PERIOD ADD
TERMS/A10=
IF EDIT(LOV_ACADEMIC_PERIOD.VALUE, '$$$$99') EQ '30' THEN
EDIT(LOV_ACADEMIC_PERIOD.VALUE, '9999$$') || '40' ELSE
LOV_ACADEMIC_PERIOD.LOV_ACADEMIC_PERIOD.VALUE;
TERMS_DESC/A40=
IF EDIT(LOV_ACADEMIC_PERIOD.VALUE, '$$$$99') EQ '30' THEN
'Summer/Fall ' | EDIT(LOV_ACADEMIC_PERIOD.VALUE, '9999$$') ELSE
LOV_ACADEMIC_PERIOD.LOV_ACADEMIC_PERIOD.VALUE_DESCRIPTION;
END
Output is like:
[tt]
VALUE VALUE_DESC TERMS TERMS_DESC
201020 Spring 201020 Spring
201030 Summer 201030 Summer
201030 Summer 201040 Summer/Fall
201040 Fall 201040 Fall
[/tt]

I have 4 cols as I thought that I might need to join to the actual data table in order to be able to grab the single as well as combined terms.

This is the prompt from the report the way it is currently.
Code:
WHERE ( ACADEMIC_PERIOD EQ &TERM.(OR(FIND VALUE,VALUE_DESCRIPTION IN lov_academic_period)).Academic Period. );

Hope it makes sense what I'm trying to do. If this were SQL it would be something like

Summer/Fall:
Where academic_period between '201030' and 201040'

Others:
Where academic_period = '201030'

-------------
We need to also do combination prompts for other groupings of codes that are not dates or ranges, so hopefully I could apply the technique to the other prompts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top