How to provide the url to the tileserver by means of a variable?

I try to provide the URL to the XYZ Tile layer by means of a dashboard variable. The url directly in the field “URL template” works and provide the base layer as expected. When I try to replace it by the dashboard variable ${TileServer} , it is isn’t loaded. Already tried different ways like ${TileServer:text}, $TileServer but can’t get it working.

Can anyone put me on the right track?