Function to multiply values on table

Hello, I am new to xano, I currently have a database with a table that contains many numerical fields that, depending on the number, must be multiplied by x 1, x 2 or x-1

They are votes from a survey where result 1 is "good", 2 is "very good" and 3 is "very bad", I don't really know how to do it, I have thought about making 3 functions: one for when the value is = 1 multiply it x 2 another function when the value is = 2 multiply it x 1 and and when the value of the field is = 3 multiply it x -1

I'll give you screenshots of both the table and the function that I put in the API to do it.

the error it gives is message: Missing var entry:

Thank you so much

1 reply