There is not enough context to answer your question. Please try to provide a minimal, yet complete enough example and try to better explain where you want to interpolate a string value exactly.
m = Map('myconf', '...')
s = m:section(TypedSection, 'mytype', '...')
s.template = 'cbi/tblsection'
pin = s:option(Value, 'pin', 'Pin')
output = s:option(DummyValue, 'pin_output', 'Pin Output')
-- the "section" argument is the identifier of the row (uci section) we operate on
function output.cfgvalue(self, section)
local pin_value = m:get(section, 'pin')
-- alternatively:
-- local pin_value = pin:cfgvalue(section)
return pin_value or '?'
end