[Zope] Calculations - more dumb questions.

Duncan Booth duncan@rcp.co.uk
Thu, 24 Feb 2000 09:45:03 +0000


> Let's say I have an input variable, called 'customer' on the form which is
> passed to the SQL method. BUT I want to intercept that variable and do
> something with it, let's keep it simple and say that I want to put the
> string "CT" in front of what the user enters (I know that's trivial but
> for the sake of argument).
> 
> Can anyone tell me how to get that new string back into the variable
> 'customer'.
Try:
<dtml-call "REQUEST.set('customer', 'CT' + REQUEST.customer)">

Alternatively, leave the original customer alone and simply pass in 
the new value to your SQL method:

<dtml-in "sqlmethod(customer='CT'+customer)"> ...


-- 
Duncan Booth                                             duncan@dales.rmplc.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
http://dales.rmplc.co.uk/Duncan