var @abc=10

var @def=12

set @sum= /*  THIS PART */


closed as off-topic by Sebastian Kessel, Reshma, Vijay Ganji, Adam Spriggs, glls Jun 11 at 14:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Sebastian Kessel, Reshma, Vijay Ganji, Adam Spriggs, glls
If this question can be reworded to fit the rules in the help center, please edit the question.

  • are you referencing the ampscript function reference provided earlier? – EazyE Jun 10 at 20:39
  • I need to take the following two variables (abc & def) add them together then print the sum as its own variable – Diego Jun 10 at 20:49
  • 5
    It looks like a test question pasted directly into SFSE. Please take time to do some basic research before asking questions here – Lukas Lunow Jun 10 at 20:58
  • 4
    This is the second question that you have posted within an hour that can easily be solved by looking in the SFMC AMPscript documentation. Please take the time to do your own research prior to coming here. This forum is designed to support, learn and teach, not to give free solutions or dev work. – Gortonington Jun 10 at 21:16
  • 2
    Then convey this research and attempts in your questions. Provide as much details around the issue as possible. – Gortonington Jun 11 at 13:24

If you are trying to get the sum of @abc and @def, you can use the Add function:

var @abc=10
var @def=12

set @sum = add(@abc,@def)

Reference: Add (Official doc) or Add (ampscript guide)

  • Thank you. I came up with something similar but I forgot the last part and messed up my whole equation. Thank you! – Diego Jun 10 at 21:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.