Hire Me! I'm currently looking for my next role in developer relations and advocacy. If you've got an open role and think I'd be a fit, please reach out. You can also find me on LinkedIn.

Time again for another little known/used CF function. This is one I actually missed for quite some time as well. Min/Max work like so - given two values, the min will return the lessor of the two while max will return the higher value.

Ok, sounds a bit pointless, but it actually comes in handy in quite a few places where you would normally probably use a cfif statement. Consider your typical Next N interface. Normally you show N records per page. Your cfloop (or cfoutput) would use an endrow value which needs to be equal to either the current starting position plus N, or the max number of rows. If the starting position plus N is greater than the max number of rows, then you only want to go up to query.recordCount. Here is a great place to use min(), you could simply do: endrow="#min(myQuery.recordCount,url.start+perPage)#".