The TOSELECTOR function takes a Geo Time Series™ or Geo Time Series™ LIST from the top of the stack and, for each encountered GTS, replace it with a selector which would select it.

This selector can be used as input of PARSESELECTOR for a FETCH.

TOSELECTOR is available since version 1.0.0.

See also



// Create a new GTS with three values NEWGTS 'test name' RENAME { 'label0' '42' 'label1' 'foo' } RELABEL 100 NaN NaN NaN 10 ADDVALUE 200 NaN NaN NaN 9 ADDVALUE 300 NaN NaN NaN 8 ADDVALUE 'gts1' STORE // Clone it and change one label $gts1 CLONE { 'label0' '33' } RELABEL 'gts2' STORE DROP // gts1 was left on the stack by CLONE [ $gts1 $gts2 ] TOSELECTOR // <% PARSESELECTOR %> FOREACH // Uncomment it to parse each selector