Passing values to a LINKSCREEN in PH Web
Deskin, Bob
Bob.Deskin@Cognos.COM
Fri, 29 Jun 2001 11:46:51 -0400
I finally got caught up with this thread so I have lots of comments...
First off, PH Web applications have a different architecture as compared to
QUICK. The issues being discussed here are about how to get values back and
forth between HTML pages and the corresponding screen files (page processing
specifications). The actual QDESIGN coding is very similar.
If I understand this, the user enters a value and then clicks a link. Just
because the value is entered doesn't mean that it's passed. The anchor link
is standard HTML and won't automatically pick up values from the page. Keep
in mind that the link (and values) is created by the last time you sent down
a request. So timing is important. You can do an number of things to resolve
this.
You could create a script that submits the link when the user enters the
invoice number such that the number is transmitted. This could also be
attached to a button that the user clicks.
You could create a button to a named designer procedure as Simon suggested
that accepts the values you need and does a DEFER LINKSCREEN. I recall you
having problems with DEFER LINKSCREEN in the past. If you're running over a
multi-machine setup, you may need to specify the absolute address of your
PHCGI just before the DEFER LINKSCREEN using SET HTTP.
When you run a named designer procedure you need NODATA because PH Web
doesn't automatically retrieve the data. We didn't want to assume anything.
Also, it may be easier to do a PRECOMMANDS FIND to get data into the buffers
rather than doing accepts on record items. The accepts will change the
record status and you may get errors.
As for QUICK on NT, we're investigating but no promises. However we are also
investigating a trace facility for PH Web that would give a trace of each
source statement used in a PH Web request. Sort of like what you would see
if you single stepped through things. We would also provide the ability to
watch particular items so you could trace value changes.
The reason for this is that while the QUICK debugger lets you watch most of
the process (except on NT), there are things that PH Web does differently.
Hopefully we'll be able to get it into the next release.
Bob Deskin
PowerHouse Web Product Manager, Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 7268 FAX: (613) 727-1178
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA
-----Original Message-----
From: Edis, Bob [mailto:bob.edis@fleetpride.com]
Sent: Friday, June 29, 2001 11:28 AM
To: 'powerh-l@list.swau.edu'
Subject: RE: Passing values to a LINKSCREEN in PH Web
Thanks for the info Richard.
You must not be using the Windows NT version of PH. The WinNT version
(8.21D) does not have a user interface for Quick so one can't run the
screens in terminal mode. :(
Bob D. Can we request that this be available in the next version, please?
It would help a great deal if we can separate HTML issues from Quick issues
in the debug process and being able to run the screens in terminal mode will
facilitate this. Debug is a great tool in figuring out issues in PH screens
and not being able to use it on NT is a pain.
Regards,
Blue
-----Original Message-----
From: Richard Sheehan [mailto:sheerich@isu.edu]
Sent: Friday, June 29, 2001 9:30 AM
To: Edis, Bob
Subject: Re: Passing values to a LINKSCREEN in PH Web
Bob,
I have compiled several screens in debug mode for PH Web. It was of
enormous help in learning what is happening in PHWeb Quick screens and
general debugging. The nice thing about PHWeb quick screens in debug
mode is that you don't have to work around passed items which might
otherwise cause the error "An incorrect number of linkage parameters was
passed to the screen." Since the screen accepts the values you are
interested in, you just need to enter them as they are prompted for in
the screen being debugged.
One thing to remember, you must run the quick screen as a terminal
application, leaving "PH Web" out of the picture for the time being.
Since you are running the quick screen as a terminal application, your
screen layout will need to be such that it will fit on your terminal
screen.
>From there, in order to perform various PH Web actions, you should
follow the "Application Engine Command Sequence" found in Ch. 5 of the
PH Web manual under "PowerHouse Web Server Actions" to mimic the
sequence of events occurring for your quick screen.
HTH.
Also, another thing we have discovered here after a short time: Looking
at the Table referred to above, temporary items may reset at mode, which
could have undesired effects. For almost all of our temporary items, we
add the nice little phrase "reset at startup."
"Edis, Bob" wrote:
>
> Thanks Simon
>
> I tried a designer procedure like you said but when I click on it, the
> screen flickers bit and nothing else happens! :(
>
> Can I use debug with PH Web screens?
>
> Regards,
> Blue
>
> -----Original Message-----
> From: Bodger, Simon [mailto:Simon.Bodger@cognos.com]
> Sent: Thursday, June 28, 2001 7:14 PM
> To: 'Edis, Bob'; 'powerh-l@list.swau.edu'
> Subject: RE: Passing values to a LINKSCREEN in PH Web
>
> Hi Bob
>
> I confess I've not fully read through all you supplied in detail, but it
> sounds as if you're getting your Client Side (in this case JavaScript in
the
> browser) and Server Side (in this case PowerHouse Web) slightly mixed up.
>
> The values passed in the <A HREF..> link are generated on the SERVER, and
by
> having the user enter a value and immediately clicking the link, you never
> go back to the server and get the link regenerated to reflect the changed
> value.
>
> Instead of having your users click on a link after entering the value,
> consider giving them a button instead. You could then change your
> LINKSCREEN to a DEFER LINKSCREEN within a designer procedure linked to
that
> button. You may also need to code ACCEPT statements for all the values
you
> pass.
>
> Have fun.
>
> Simon.
>
> -----Original Message-----
> From: Edis, Bob [mailto:bob.edis@fleetpride.com]
> Sent: June 28, 2001 7:32 PM
> To: 'powerh-l@list.swau.edu'
> Subject: Passing values to a LINKSCREEN in PH Web
>
> G'day all, again
>
> Ok, so now my JavaScript is 'maybe' resolved. What I'm trying to do is
call
> one screen from another like so.
>
> Screen A.
> User enters a customer id, finds related records in results list and data
is
> loaded for selected record (happens to be a cheque).
> User enters an invoice number (temp item) on screen and clicks link to
> subscreen (screen B) to see invoice detail (actually could be several
> records as invoice number is not unique). There user selects invoice
record
> and is taken to a posting screen to apply part or all of the cheque value
to
> the selected invoice (screen C).
>
> In screen A the logic is:
>
> QKS
> ...
> TEMP t_invoice_nbr VARCHAR*15 RESET AT STARTUP
> TEMP t_invoice CHAR*01 INIT "Y"
> ...
> FIELD t_invoice_nbr LABEL "Invoice #:" &
> LOOKUP ON post_invoice &
> MESSAGE "*E* Invoice not found!"
> FIELD t_invoice NOLABEL
> ...
> LINKSCREEN pc_select_invoice LABEL "Select Invoices" &
> ACTION "SEARCH" &
> PASSING corp_cust_id AS "POST_INVOICE:corp_cust_id", &
> t_invoice_nbr AS "POST_INVOICE:invoice_nbr", &
> check_nbr AS "t_check_nbr", &
> check_date AS "t_check_date", &
> amount AS "t_check_amount", &
> amount_applied AS "t_amount_applied", &
> amount_open AS "t_amount_open", &
> t_invoice_status AS "t_invoice_status", &
> check_key AS "t_check_key", &
> t_invoice, &
> t_sort_inv_nbr
>
> HTML
> <input type="hidden" size="1" name="T_INVOICE"
> value="<!--PH:VALUE:T_INVOICE-->">
> ...
> <table width="60%" cellpadding="0" cellspacing="0" frame="void">
> <tr>
> <td align="right">
> <B><I>Invoice Number </i></b>
> </td>
> <td width="18">
> <input type="text" size="14" name="t_invoice_nbr"
> value="<!--PH:VALUE:t_invoice_nbr-->">
> </td>
> <td align="left">
> <A
>
HREF="/cgi-bin/phcgi.exe?PH_QKC=pc_select_invoice&PH_APP=CORPCUST_APP&am
>
p;PH_HTML=pc_select_invoice.htm&PH_ACTION=Search&POST_INVOICE:corp_c
>
ust_id=<!--PH:LINKVALUE:POST_CHECK:corp_cust_id-->&POST_INVOICE:invoice_
>
nbr=<!--PH:LINKVALUE:T_INVOICE_NBR-->&t_check_nbr=<!--PH:LINKVALUE:POST_
>
CHECK:check_nbr-->&t_check_date=<!--PH:LINKVALUE:POST_CHECK:check_date--
>
>&t_check_amount=<!--PH:LINKVALUE:POST_CHECK:amount-->&t_amount_appl
>
ied=<!--PH:LINKVALUE:POST_CHECK:amount_applied-->&t_amount_open=<!--PH:L
>
INKVALUE:POST_CHECK:amount_open-->&t_invoice_status=<!--PH:LINKVALUE:T_I
>
NVOICE_STATUS-->&t_invoice=Y&t_check_key=<!--PH:LINKVALUE:POST_CHECK
> :check_key-->"><font color="#FFFF80">Select Specific Invoice</font>
> </A></font>
> </td>
> </tr>
> </table>
>
> In screen B the logic is:
>
> QKS
> ...
> TEMP t_invoice CHAR*01 RESET AT STARTUP
> ...
> FILE post_invoice IN cidb PRIMARY &
> HTMLKEY corp_cust_id &
> HTMLFIELD corp_cust_id, customer_id, &
> invoice_nbr, po_nbr, &
> amount, date_invoice, &
> source_system, branch_id
> ACCESS VIA corp_cust_id, invoice_nbr &
> USING corp_cust_id, invoice_nbr &
> ORDERBY customer_id, branch_id &
> REQUEST corp_cust_id, invoice_nbr, t_invoice
> ...
> FIELD Corp_cust_id OF post_invoice PREDISPLAY LABEL "Corp ID "
> ...
> FIELD invoice_nbr OF post_invoice PREDISPLAY LABEL "Inv Nbr "
> ...
>
> PROCEDURE INITIALIZE
> BEGIN
> ...
> ACCEPT t_search_thread
> ACCEPT t_ph_loadid
> ACCEPT t_invoice
> END
>
> HTML
> <tr>
> <td>Corp Cust Id</td>
> <td><input type="text" size="11" name="POST_INVOICE:Corp_cust_id"
> value="<!--PH:VALUE:POST_INVOICE:Corp_cust_id-->"></td>
> </tr>
> <tr>
> <td>Invoice Nbr</td>
> <td><input type="text" size="15" name="POST_INVOICE:invoice_nbr"
> value="<!--PH:VALUE:POST_INVOICE:invoice_nbr-->"></td>
> </tr>
> <tr>
> ...
> <input type="hidden" size="1" name="T_INVOICE"
> value="<!--PH:VALUE:T_INVOICE-->">
>
> Now for the problem.
>
> When the user enters an invoice number in the t_invoice_nbr field and
clicks
> on the link, the value for POST_INVOICE:invoice_nbr is not being passed.
> How do I make the screen pass this value?
>
> Here is what is being passed at run-time:
>
> <A
>
HREF="/cgi-bin/phcgi.exe?PH_QKC=pc_select_invoice&PH_APP=CORPCUST_APP&am
>
p;PH_HTML=pc_select_invoice.htm&PH_ACTION=Search&POST_INVOICE:corp_c
>
ust_id=0&POST_INVOICE:invoice_nbr=&t_check_nbr=98765&t_check_dat
>
e=06/10/01&t_check_amount=546.87&t_amount_applied=0&t_amount_ope
> n=546.87&t_invoice_status=&t_invoice=Y&t_check_key=4"><font
> color="#FFFF80">Select Specific Invoice</font></A></font>
>
> Man, I feel like I'm back in school learning PH Web; it's sooo different
to
> standard programming in PH4GL.
>
> Regards,
> Blue
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
> powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
--
Richard Sheehan,
Administrative Systems - IT Programmer Analyst Associate
Idaho State University Computing & Communications
Campus Box 8037, Pocatello, ID 83209-8037
Phone: 208.282.3861 - Fax: 208.282.3673
Email: sheerich@isu.edu
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.