|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Zope ZSQL problem
I have 4 ZSQL's that call Oracle PL/SQL functions. The 4 functions are all joined to each other in a package.
ie TXN_PKG.NEW_PROCESS_FNC (proc_new_process) TXN_PKG.NEW_TXN_FNC (proc_new_txn) TXN_PKG.NEW_TXN_ATT_ZOPE (proc_add_data) TXN_PKG.TXN_INPUTTED (proc_release_txn) They all have 1 return value called return_value. These functions need to run one after the other on the submit of a form. I will explain here what inputs each one have TXN_PKG.NEW_PROCESS_FNC This has one input and is fixed, the value is "4" TXN_PKG.NEW_TXN_FNC This has three inputs in this order: txn_group : "1021" (fixed) null_value : "null" (fixed) txn_id : "return_value of TXN_PKG.NEW_PROCESS_FNC" TXN_PKG.NEW_TXN_ATT_ZOPE This has three inputs txn_id : "same as above" attribute_value : "RULE_ID" (fixed) attribute_amount : "variable determined by user" inputted via form TXN_PKG.TXN_INPUTTED This has one input txn_id : "same as above" Now that I have explained roughly what each object does, I will explain my dilema. There is a form which the user uses and it has only 1 input box for the attribute_amount. The rest of the fixed value's are hidden fields in the form. On submit all 4 ZSQL's need to be run one after the other. So I need to find a way to pass the variables from one ZSQL to the other. I have tried doing it this way (the form calls the below code, which is in a seperate method) <dtml-try> <dtml-in proc_new_process> <dtml-let process_id=return_value> </dtml-let> </dtml-in> <dtml-except> |script> alert("error one"); |/script> </dtml-try> <dtml try> <dtml-in proc_new_txn> <dtml-let txn_id=return_value> </dtml-let> </dtml-in> <dtml except> |script> alert("error two"); |/script> </dtml try> <dtml-try> <dtml-call proc_add_data> <dtml-except> |script> alert("error three"); |/script> </dtml-try> <dtml-try> <dtml-call proc_release_txn> <dtml-except> |script> alert("error four"); |/script> </dtml-try> (I have replaced < with | in front of the script tags) But this does not work, it does the first ZSQL but fails after that - it does not find the value's. HELP PLEASE wabirdman
__________________
Real programmers code in binary |
|
#2
|
|||
|
|||
|
It turned out to be an easy solution
<dtml-in proc_new_process> <dtml-call "REQUEST.set('txn_group', 4)"> <dtml-call "REQUEST.set('process_id', return_value)"> </dtml-in> <dtml-in proc_new_txn> <dtml-call "REQUEST.set('txn_type', 1021)"> <dtml-call "REQUEST.set('txn_id', return_value)"> </dtml-in> <dtml-call proc_add_data> <dtml-call proc_release_txn> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Zope ZSQL problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|