Skip to main content
Level 2
Feb 13, 2025 12:01 PM UTC
Solved

Is there an alternative to setOption() in personalization blocks?

Hello,

 

as the query says, im trying to fins a way to set an option without using setOption() since it does not work in personalization blocks. Anyone facing same issue and found a way/workaround to make it work? 

 

 

Thanks

ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Feb 13, 2025 12:49 PM UTC

Hi @pabloneruda,

You can call the Option value in Delivery's script tab and follow the steps mentioned in this thread to call the variable in delivery's personalization block.

Script to enter in Delivery's script tab:

delivery.variables._var[0].stringValue= getOption (optionName);
~  ParthaSarathy S

2 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Feb 13, 2025 12:49 PM UTC

Hi @pabloneruda,

You can call the Option value in Delivery's script tab and follow the steps mentioned in this thread to call the variable in delivery's personalization block.

Script to enter in Delivery's script tab:

delivery.variables._var[0].stringValue= getOption (optionName);
Translate
~  ParthaSarathy S
Cl4ud
Level 2
Feb 22, 2025 3:27 PM UTC

Thank you very much, i ll try this way. 🙂

Translate