Script token inserts code with change data value flow step in stead of the resultant
Hi all,
I have a script token {{my.getdomain}} that splits an email address and retrieves the domain name in a variable:
#set( $em = ${lead.Email} )
#set( $dom = $em.split("@") )
$!{dom[1]}
However, with the 'add data value' flow step it adds into the field (string) webdomain:
{"codeBlock":"#set( $em = ${lead.Email} )\n#set( $dom = $em.split(\"@\") )\n$!{dom[1]}","scriptingObjects":{"standard":{"2":{"label":"Person","fields":{"31":{"label":"Email Address"}}}}}}
in stead of the domain name from the email address (I did check the field 'email address' on the right hand pane).
If I add the same token in an email, it renders correctly.
Any ideas why the domain name is not entered into the field?