CCPulse Scripting Dynamic DB select

Hi all,

I want to get data from a database which correspond to the RoutingPoint/VQ on which the template in CCPulse is loaded.
Example:
select “Value” from database where routingpoint = “RoutingPointNumber or VQ from template”

Currently I know only the static , hard coded version:
select “Value” from database where routingpoint = “123”

Thx!