-6
%%[

var @abc=10

var @def=12



set @sum= /*  THIS PART */



]%%
  • are you referencing the ampscript function reference provided earlier? – EazyE Jun 10 '19 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 '19 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 '19 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 '19 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 '19 at 13:24
1

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)

| improve this answer | |
  • 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 '19 at 21:25

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