How to drive extrusion length from equation?

The effect I want is to create an extruded/boss from base, select the sketch, set the length (D1) field to a length in an equation (such as D1@sketch3 or "PinLength" in a global equation.

This is surely possible, but for the life of me I cannot figure out how from the help or this forum.

SolidworksConfigurations design Tables