The Zest Action Parameters are converted to variables in the called
script, they will have the names/values as defined in the Action.
In your example, you called it "token" you should then use it as "token"
in your script and it will have the value "/?%=ANYTHING".
(If you want to pass dynamic values to the script you need to use a Zest
variable reference in the Value instead, e.g. {{MyZestVar}}.)
The Zest evaluates the provided script, it does not call any function
within it, the result of the evaluation is what will be set into the
Zest variable (as defined in the "Variable Name" field).
Should also note that the evaluation is converted to string (e.g. call
of Java's toString() method).
If you want to use that script you need to call the process function
yourself, e.g. at the end of the script do:
process(token)
but as mentioned above that will result in the toString() being called
on the EncodeDecodeResult object, which is not that helpful.
Best regards.
On 09/09/2022 21:00, Octavio Ricci wrote:
> I try to reformulate the question.
>
> How can I send from my zest script the value I want, to the Encode/Decode
> function (that url encodes the value it receives), and receive to a Zest
> Variable?
>
> I´ve tried to add the "Encode/Decode" Script to my Zest standalone Sctipt,
> with the "Add Zest Action -> Action Script", but It seems that I can´t.
>
> Thanks!
>
> El jueves, 8 de septiembre de 2022 a la(s) 18:57:22 UTC-3, Octavio Ricci
> escribió:
>
>> I´m new with Zest scripts, so It´s a bit difficult for my reading directy
>> from the script ,
>> But I´ve seen the Zap Deep Dive - Scrips
>>
>> So, I create a *standalone scrip*t called *Encode *with this code:
>> (Basically receives a value, and returns it encoded)
>> [image: Encode_Script.jpg]
>>
>> Then I create *another standalone *script2 (let´s call *Script2*), and I