Multiple scripts in custom element

Hi,
I have custom task for sending emails with a subject input and an email body input. I want to make them both dynamic velocity fields, but when declaring both as velocity scripts, only one actually works and the other field flags an error.

image

ERROR:

Hi @dzou422,

reading the error message form the picture is difficult, but is says that the variable testinstanceid is not set.

Where should it be set?

Hope this helps, Ingo

It should be retrieved from the process variables by the velocity engine, but for some reason this only works if one email field is sent with the velocity scriptformat

image
this is an example input, it runs fine if a ${…} token is in either the subject or the email, but if there’s a token in both then I get the error.