Hi. I would like to define a character field and then set the value of this to be the result of a prompt at run time. I then intend to use the value of this to determine other aspects of how the report looks. How do I set up the define to do this. Thank you.This message has been edited. Last edited by: tcox,
Release 8 Windows 7 Excel/HTML/PDF Oracle 11g
March 19, 2013, 05:06 PM
TRue
Hi tcox, It seems your post has not received any response, probably because it's a bit vague. Help for creating a prompt or defining a new field can be found in the InfoAssist User Manual IA User Manual but please clarify if you are looking for more specific help?
InfoAssist only - Version: 7703 Windows 7 Excel and PDF outputs
March 26, 2013, 11:16 AM
tcox
Hi TRue.
Thanks for taking the time to reply, and sorry if the request was a bit vague. I'll try to explain it better. I have 3 fields on a db table which I need to use to create 1 output column. So imagine they are A, B and C. The output can look like A on it's own, or A+B or A+B+C. I want the user to be able to determine this via a prompt at run time. Then I would use their response in the define statement for the output column. Something along the lines of IF 'response' = 1 THEN value = 'A' ELSE if 'response' = 2 THEN value= A||B ELSE value=A || B || C Easy to do if programming but I can't work out how to use a reply to a prompt in the field definition screen. Hope that helps?!
Release 8 Windows 7 Excel/HTML/PDF Oracle 11g
April 19, 2013, 10:07 AM
noelmcavoy
Hello tcox, So, just to make sure I understand, you want them to choose which combination of fields is used to create the define?
WebFOCUS 8.1.0.5 Windows 10, all output
April 19, 2013, 10:18 AM
tcox
Hello noelmcavoy. that is correct. I'm really trying to use the prompt as input to an IF statement rather than a filter. Someone has suggested using &variables in the define statement so I'll be trying that out next week. I'll let you know if that works anyway.
Thank you.
Release 8 Windows 7 Excel/HTML/PDF Oracle 11g
April 26, 2013, 04:30 AM
tcox
Hi dbeagan. Thank you for this. With a little tweaking I now have it working exactly as I wanted. Thanks again!!
dbeagan's solution was: Did this in InfoAssist using GGSALES as an example. Let A=REGION B=ST C=CITY. Create two DEFINE fields: REGION_ST/A15 = REGION || '-' || ST; REGION_ST_CITY/A40 = REGION || '-' || ST || '-' || CITY;
Create a COMPUTE field: FIELDS/A40 = &Fields.(,,).Region / State / City.
And add other fields and complete the report. When run, you will be autoprompted for fields, select and run.This message has been edited. Last edited by: tcox,