Say you need to find the lowest of three numbers in an email — numbers you’ve retrieved from a Data Extension. Here’s one way to do it in AMPScript with a set of inline-if statements:

See the gist on github.

Output

num1: 105.54
num2: 88.73
num3: 106.32
lowestNum: 88.73

Reference

Share
Published by
Adam Spriggs @wvpv

Recent Posts

3D Printed Mechanical Counter

https://youtu.be/pBoHq3AG8rw Amazing mechanical counter by Florian Hu. Here's the 3D model. More from Florian Hu: Projects | Portfolio

1 month ago

How can leaders learn empathy?

https://youtu.be/8Yrmopm5Npc [...] maximizing shareholder value [...] where we prioritize the wants, needs, and desires of an external constituency over our…

1 month ago

143 Robin Lopez Hook Shots

https://youtu.be/D-QaDLfogNM Check out 143 hook shots by Robin Lopez from the 2018-19 season.

2 months ago

How Pencils are Made

https://youtu.be/aPb-slJH9Vs

2 months ago

Just read the documentation

They said, "just read the official documentation"...

3 months ago