SOLVED

HELP : Conditional Scripting

Go to solution
nsildeyna
Level 1

Re: HELP : Conditional Scripting

12-15-13.gif

SanfordWhiteman
Level 10 - Community Moderator

Re: HELP : Conditional Scripting

That’s not what it should look like. Open a P1 ticket immediately, I wouldn’t trust any instance with this behavior to be using tokens correctly.

 

In proper operation, Script Editor works like this:

Note I removed the formal notation (curly braces) as that’s how you should start working with variables on the canvas. Formal notation is only necessary for output and otherwise can cause unexpected errors.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: HELP : Conditional Scripting

Woah- never seen this! @nsildeyna, as Sandy says, you should open a P1 support ticket! I'd also include this video so that they're clear as to what is happening.

Jo_Pitts1
Level 10 - Community Advisor

Re: HELP : Conditional Scripting

@Darshil_Shah1, don't forget that dragging the field into the editor from the tree on the RHS always uses formal notation, which should largely be avoided (see @SanfordWhiteman's excellent blog here https://blog.teknkl.com/strive-to-avoid-velocity-formal-references/). 

 

@nsildeyna, the other thing to note is that when you drag and drop a field from the tree to the editor, it doesn't drop it where your mouse pointer ends up, but where the text editing cursor is.  That got me a few times back in the day!

 

Cheers

Tags (1)
nsildeyna
Level 1

Re: HELP : Conditional Scripting

Good to know! Thanks @Jo_Pitts1 

the primary question rn maybe,
why it didnt catch the conditional logic while both are Down ?

should we normalize it to string first?

SanfordWhiteman
Level 10 - Community Moderator

Re: HELP : Conditional Scripting


why it didnt catch the conditional logic while both are Down ?

should we normalize it to string first?


No such thing as normalizing to a String. All lead fields are Strings in Velocity.

Jo_Pitts1
Level 10 - Community Advisor

Re: HELP : Conditional Scripting

@nsildeyna ,

Can you paste in the current version of your code.  I'm not sure exactly what it looks like currently.

Can you also confirm you have the field you are using ticked in the tree on the RHS.

Cheers

Jo