0

so... I was trying use the multiply option but an error appears:

An error occurred when attempting to evaluate an Multiply function call. See inner exception for details. Invalid value specified for function parameter. Function Name: Multiply Parameter Name: Value2 Parameter Ordinal: 2 Parameter Type: Numeric

%%[ 
VAR @saldo, @nombre, @copy, @conversion, @reward 

SET @nombre = AttributeValue ('nombre') 
SET @conversion = '0.01' 
SET @reward = AttributeValue ('ultimos_puntos_ganados') 
SET @saldo = Multiply(@conversion, @reward) 
SET @copy = Concat(“Recibiste”, @saldo, " MXN -” ,@reward, “puntos- que puedes usar inmediatamente para ahorrar en tu próximo viaje.”)

]%%

Any clue?

3
  • Can you delete the space between attributevalue and the bracket, it might be the reason. AttributeValue('nombre') another thing is that you set conversion as a string. Try to write set @conversion = 0.01 Also it might work with the ' because variables are loosely typed. If it still doesn’t work we might need to know how nombre and ultimos.... are retrieved (source and examples) Aug 6, 2019 at 20:07
  • Hi Johannes, it didn't work :( We receive the data via API and the data type is numeric. Do you think that could cause trouble? Aug 6, 2019 at 20:48
  • I would verify the value you are getting for 'ultimos_puntos_ganados' I suggest commenting out the multiply part and print the value for @reward and review what you are trying to multiple
    – EazyE
    Aug 7, 2019 at 3:14

2 Answers 2

2

That is a quite unconventional problem - There is a problem with the quotation marks in your CONCAT line.

SET @copy = Concat(“Recibiste”, @saldo, " MXN -” ,@reward, “puntos- que puedes usar 
inmediatamente para ahorrar en tu próximo viaje.”)

As you can see, some of them are not identical (you got 2 different types of quotation marks):

“quote...”

and

"quote..." (You're supposed to use these)

so instead, change this line to a one with fixed quotation marks, like this:

SET @copy = Concat("Recibiste", @saldo, " MXN -" ,@reward, "puntos- que puedes usar 
inmediatamente para ahorrar en tu próximo viaje.")

That should work.

0

I changed some “ to " in @copy but since we don't know if its working we need you to give us the output from this[execute this on a cloudpage or somewhere]:

%%[ 
VAR @saldo, @nombre, @copy, @conversion, @reward 

SET @nombre = AttributeValue('nombre')
Output(Concat("Nombre value is: ",@nombre,"<br>"))
/* You should try '0.01' when this doesnt work on conversion */
SET @conversion = 0.01
Output(Concat("conversion value is: ",@conversion,"<br>"))
SET @reward = AttributeValue('ultimos_puntos_ganados')
Output(Concat("reward value is: ",@reward,"<br>"))
SET @saldo = Multiply(@conversion, @reward) 
Output(Concat("saldo value is: ",@saldo,"<br>"))
SET @copy = Concat("Recibiste", @saldo, " MXN -" ,@reward, "puntos- que puedes usar inmediatamente para ahorrar en tu próximo viaje.")
Output(Concat("copy value is: ",@copy,"<br>"))

]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .