Convert field name to string of my choosing -- TICKscript is hard

To de-dupe series, I used flatten() which resulted in my having a computed field name.

field pool_foo = 5
tag name = 'pool_foo'

Is there something I could do, maybe an eval(), that would help me convert the field name to a static string of my choosing, like ‘count’?

As you can see from the example, I also have a tag whose value is the name of the field. Could I use that some way?

I’m finding that performing certain actions with TICKscript is hard. While I’ve been feeling like there are limitations of TICKscript that make this the case, I’m coming to think that I may be trying to achieve things with TICKscript that it wasn’t designed for. I may be misusing the tool.

I’m guessing that I should probably be pre-munging my data with a continuous query, then using the simpler “digested” results in my TICKscript processing. Is this a common pattern?