Calculated Field Name

Remind me please of how to reference a calculated field name.

ie. How do I do reference a field that whose name needs to be dynamically calculated? When X=3, I want to reference Tank3.

Use the grabdata( or datavalue( function.

value = grabdata("","Tank"+str(X))


value = datavalue("Tank"+str(X))

I’m wanting to assign a value to Tank3, not get its value.


Tank3 = 4

when I only know that X = 3

In that case

Set "Tank"+str(X), value

You can also use Field (variablename) to select the field and then do formulafills etc.

You can also use more complex formulas.

Field "Tank"+str(X)