Focal Point
[CLOSED] -PROMPT variable in launch page

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

June 19, 2008, 08:33 PM
JohnB
[CLOSED] -PROMPT variable in launch page
Is there a way to get a control for a -PROMPT variable in a launch page?

For example, -PROMPT &START_DATE is not recognized by the HTML Layout Painter, but WHERE HIREDATE GE &START_DATE is, and you can select which type of control you want for it.

Thank you,

John

This message has been edited. Last edited by: Kerry,


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 19, 2008, 09:04 PM
Waz
I beleive this is all done in the HTML Layout painter.

It generates WHERE HIREDATE GE &START_DATE.txt etc.

That sort of prompt are you after ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 20, 2008, 01:39 AM
JohnB
I have some Dialog Manager code that creates variables that will be used in the table request.

I need to have some -PROMPT &variable.(a,b,c,d) commands appear in the launch page as list boxes.


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 20, 2008, 02:10 AM
Tony A
John,

Do you use or know any JavaScript at all? If you do then one method would be to use a JS created dialog which is easier than it sounds.
The syntax is - variable = prompt('[prompted text]','[default value]');, such as in -

  v_year = prompt('Please enter the Year','2008');
This will give you a prompt in a dialog box -



You can then assign that variable to a hidden input so that it will be passed onwards into the URL at form submission.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 20, 2008, 09:12 AM
GinnyJakes
-PROMPT is very old syntax used way back in the day before we had PCs and before it was easy to generate user-facing request pages.

I would go with Waz's suggestion and take the -PROMPT out of your program. The HTML Layout Painter will take care of presenting a control which you can set to be whatever type you like including a calendar control.

You can use a -DEFAULT as well to force the control of the amper variable.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
June 20, 2008, 12:31 PM
JohnB
Ginny,

The reason for using the -PROMPT's was to reduce processing and programming complexity that would be required with a lot of defined fields and extra table requests and joins. Dialog Manager with variables gives you the flexibility you don't have with table requests and fields.

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
June 20, 2008, 02:05 PM
Anatess
John, if you create the fex with & variables and you don't use -DEFAULT to set the initial value of that variable, then when you run it, Webfocus should automagically splash a prompt page for you asking for the values to be provided. So, yeah, unless you want it nice and pretty and personalized, just follow what Waz says and take out or comment out all the -prompts and see what happens.


WF 8.1.05 Windows
June 20, 2008, 02:08 PM
GinnyJakes
John,

I understand the value of Dialogue Manager as I have been doing FOCUS for 24 years. The fact that your procedure makes liberal use of DM to construct code (which was not apparent from your posts) doesn't preclude the fact that the HTML Layout Painter can generate the controls for you. Since I haven't seen your code, I can't begin to guess what your problem is.

If your program is very dynamic, you might want to create a version that is less so and do the page with the painter from that one, then make the appropriate changes to have it run the fex you actually want it to run.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 01, 2012, 04:35 PM
Doug
quote:
-PROMPT is very old syntax used way back in the day before we had PCs and before it was easy to generate user-facing request pages.

Tried and true. I used it today. I hope it never goes away...

BTW: Hi Ginny... Cool
May 02, 2012, 04:51 AM
Baillecl
Bonjour,
This is an exchange for me.
I do not appreciate at all so many DS tools that know so little about DM that they move the lines at the very top ...
-PROMPT and Implicit Prompt for undefined DM variables are prehistorical ( PC/Focus too had it).
And I don't like that so many people ignore the power you can get when coupling both levels of interpretation : Focus and DM.
Just try to understand the dot Eval option of DM that makes a string be interpreted as code and you'll get an idea of how to reach the usually unreachable.
The MiddleWare aspect, which too, was a very big point in Focus, from what I know of the start, has turned into a front head role. It should stick to what it never should have ceased to be : a very powerful and silent, tool.
MeMyself, by the way, should also turn back to a mute Focus Lover (and more and more out of the game) ...
Focusely, UnObjectively, and, Nonetheless Cordially


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
May 02, 2012, 10:22 AM
Francis Mariani
I've worked with WebFOCUS for about 12 years and have never used -PROMPT. Perhaps I used it when I worked on PC-FOCUS, but I can't remember that far back.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 02, 2012, 12:23 PM
Doug
"-PROMPT" is just another tool in my toolbox. And, the specs in the Task-at-hand explicitly stated No Launch Page to be created. But, wanted a dropdown list of available values. So, I reached really deep-down into the toolbox and puled out the "-PROMPT" and don't see any issues with using it...

And, BTW: I remember those days of coding in PC FOCUS. I just can't find the floopy that it's on, so, I can't reload it on my 286 machine...
May 03, 2012, 08:37 AM
Baillecl
I was far away from -PROMPT, which is a detail.
I was just talking about the way that DS Tools do not respect the DM code.


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
May 03, 2012, 01:46 PM
Rao D
-PROMPT &VARIABLE.(OR(VAL1,VAL2,VAL3)).Variable;

The above line of code produces a list box option either in the HTML layout painter or even in the default prompt page in MRE.


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio