passing values between PH Web screens
Edis, Bob
bob.edis@fleetpride.com
Thu, 21 Jun 2001 16:06:43 -0500
G'day all
Environment:
PH Web 2.21D3
PH 4GL 8.21D4
Windows NT 4.0 sp6
MS SQL Server 7.0 sp3
IIS 4.0
We have a problem with passing values to a web screen that some out there
may be able to identify for us.
Screen A: a table of 10 rows displaying invoice records. The left most
column is a link to screen B (partial pay) and the right most column is a
link to screen C (full pay).
Screen B: displays the selected invoice and allows the user to enter the
amount being paid on the invoice.
Screen C: acts as a ghost screen. The POSTFIND procedure handles all the
data updating using procedural code.
Problem: this used to work fine. However, now when either screen is
selected, the invoice record is not found. Instead I am left with an empty
screen and the error message "No records were found matching index/selection
values." in the screen B case and an empty default PHWeb screen page in the
screen C case.
The screen B call in screen A is:
<A
HREF="/cgi-bin/phcgi.exe?PH_HTML=pc_post_payment.htm&PH_QKC=pc_post_paym
ent&PH_APP=CORPCUST_APP&PH_SEARCH=t_sort_date_d%3D%3DY*-*-*T_CHECK_K
EY%3D%3D2*-*-*T_AMOUNT_OPEN%3D%3D77.48*-*-*T_AMOUNT_APPLIED%3D%3D0*-*-*T_CHE
CK_AMOUNT%3D%3D77.48*-*-*T_CHECK_DATE%3D%3D04/05/01*-*-*T_CHECK_NBR%3D%3D000
077196*-*-*POST_INVOICE:Corp_cust_id%3D%3D50&PH_ACTION=Search&T_SEAR
CH_THREAD=t_sort_date_d%3D%3DY*-*-*T_CHECK_KEY%3D%3D2*-*-*T_AMOUNT_OPEN%3D%3
D77.48*-*-*T_AMOUNT_APPLIED%3D%3D0*-*-*T_CHECK_AMOUNT%3D%3D77.48*-*-*T_CHECK
_DATE%3D%3D04/05/01*-*-*T_CHECK_NBR%3D%3D000077196*-*-*POST_INVOICE:Corp_cus
t_id%3D%3D50&T_PH_LOADID=&T_INVOICE_NBR=211710031&T_CORP_CUST_ID
=50&T_INVOICE_AMOUNT=57.24&POST_PAYMENT:amount=57.24&POST_PAYMEN
T:Corp_cust_id=50&POST_PAYMENT:Invoice_nbr=211710031&T_CUSTOMER_KEY=
25307&T_CHECK_KEY=2&T_SORT_INV_NBR=&T_SORT_PO_NBR=&T_SORT_AM
OUNT=&T_SORT_INV_NBR_D=&T_SORT_PO_NBR_D=&T_SORT_AMOUNT_D=&T_
INVOICE_KEY=49113">Partial Pay </A>
The screen C call in screen C is:
<A
HREF="/cgi-bin/phcgi.exe?PH_HTML=pc_post_payment_full.htm&PH_QKC=pc_post
_payment_full&PH_APP=CORPCUST_APP&PH_SEARCH=t_sort_date_d%3D%3DY*-*-
*T_CHECK_KEY%3D%3D2*-*-*T_AMOUNT_OPEN%3D%3D77.48*-*-*T_AMOUNT_APPLIED%3D%3D0
*-*-*T_CHECK_AMOUNT%3D%3D77.48*-*-*T_CHECK_DATE%3D%3D04/05/01*-*-*T_CHECK_NB
R%3D%3D000077196*-*-*POST_INVOICE:Corp_cust_id%3D%3D50&PH_ACTION=Search&
amp;T_SEARCH_THREAD=t_sort_date_d%3D%3DY*-*-*T_CHECK_KEY%3D%3D2*-*-*T_AMOUNT
_OPEN%3D%3D77.48*-*-*T_AMOUNT_APPLIED%3D%3D0*-*-*T_CHECK_AMOUNT%3D%3D77.48*-
*-*T_CHECK_DATE%3D%3D04/05/01*-*-*T_CHECK_NBR%3D%3D000077196*-*-*POST_INVOIC
E:Corp_cust_id%3D%3D50&T_PH_LOADID=&T_INVOICE_NBR=211710058&T_CO
RP_CUST_ID=50&T_INVOICE_AMOUNT=108.95&POST_PAYMENT:amount=108.95&
;POST_PAYMENT:Corp_cust_id=50&POST_PAYMENT:Invoice_nbr=211710058&T_C
USTOMER_KEY=43430&T_CHECK_KEY=2&T_INVOICE_KEY=48846&T_SORT_INV_N
BR=&T_SORT_PO_NBR=&T_SORT_AMOUNT=&T_SORT_INV_NBR_D=&T_SORT_P
O_NBR_D=&T_SORT_AMOUNT_D=&POST_INVOICE:INVOICE_KEY=48846">Full Pay
</A>
The POSTFIND procedure in screen C is:
PROCEDURE POSTFIND
;***** This custom procedure is designed to apply payment of the full
;***** value of the selected invoice.
BEGIN
;** Read control_keys to get next key value for post_payment_key
GET control_keys VIA control_key_key USING 1
LET post_payment_key = post_payment_key + 1
PUT control_keys
;** Write new post_payment record
LET payment_key OF post_payment = post_payment_key
LET check_nbr OF post_payment = check_nbr OF post_check
LET check_key OF post_payment = check_key OF post_check
LET invoice_key OF post_payment = invoice_key OF post_invoice
LET branch_key OF post_payment = branch_key OF post_invoice
LET amount OF post_payment = amount OF post_invoice
LET invoice_nbr OF post_payment = invoice_nbr OF post_invoice
LET customer_key OF post_payment = customer_key OF post_invoice
LET customer_id OF post_payment = customer_id OF post_invoice
LET source_system OF post_payment = source_system OF post_invoice
LET branch_id OF post_payment = branch_id OF post_invoice
LET corp_cust_id OF post_payment = corp_cust_id OF post_invoice
LET date_added OF post_payment = SYSDATE
LET post_code OF post_payment = " "
LET status OF post_payment = "O"
PUT post_payment
;** Update post_invoice record
LET amount_applied OF post_invoice = &
amount_applied OF post_invoice + &
amount OF post_invoice
PUT post_invoice
;** Update post_check record
GET alias_post_check VIA check_key USING t_check_key
LET amount_applied OF alias_post_check = &
amount_applied OF alias_post_check + &
amount OF post_invoice
LET amount_open OF alias_post_check = &
amount_open OF alias_post_check - &
amount OF post_invoice
PUT alias_post_check
;** Take the user back to the calling screen automatically. The user
;** should never actually see this screen.
DEFER LINKSCREEN pc_select_invoice &
ACTION "LoadPage" &
PASSING corp_cust_id AS "POST_INVOICE:Corp_Cust_id", &
t_check_key AS "t_check_key", &
t_flag, &
t_sort_inv_nbr, &
t_sort_amount, &
t_sort_po_nbr, &
t_sort_inv_nbr_d, &
t_sort_amount_d, &
t_sort_po_nbr_d, &
t_sort_date_a, &
t_sort_date_d, &
t_search_thread AS "PH_SEARCH", &
t_ph_loadid AS "PH_LOADID"
END
Any ideas?
Blue