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.


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


Published by
Adam Spriggs @wvpv

Recent Posts

Sweet satisfaction

  Some things just can't go unaddressed. The satisfaction is real, y'all.

2 weeks ago

Frank Howarth’s secret door Fascinating secret door build by woodworker Frank Howarth.

3 weeks ago

The Universal LEGO Sorter This is a sweet LEGO sorting machine by David West. Here's his other video about the AI & neural…

1 month ago

Chevy Stovebolt 6 engine rebuild time lapse Another excellent in the Redline Rebuild series by Hagerty.

1 month ago

Selecting random data extension rows with AMPscript

In a triggered send scenario, there's no chance to leverage query activities to prepare auxiliary data for display in an…

2 months ago

My Favorite Color is…

My favorite color is ice cream. Anonymous 7 year old via @LiveFromSnackTime

2 months ago