How do I have a constant variable that is based on another variable?

Best to demonstrate rather than theorize, so let’s start at the Chained Variables documentation which goes to the Graphite Templated Nested dashboard (note that the other linked dashboard, InfluxDB Templated, has no chained variables).

From there we see that to chain variables, we set server to apps.$app.*. But suppose I wanted another constant variable called prefix that was always apps.$app. I try that but the resulting value of prefix is the literal string "apps.$app" rather than dynmaically changing as app changes.

How do I get the constant variable prefix to change when app changes?