Referring to Table Variables is done in same way as referring to Columns
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Table Variable("Days", "42");
dt << New Column("Age+Days", Numeric, Continuous, Formula(:Age + num(:Days)));
https://community.jmp.com/t5/Discussions/How-to-reference-a-table-variable-inside-a-table-variable/t...
Also search Scripting Guide for Table Variable for more info such as:
Table Variables
Table variables are for storing a single text string value, such as "Notes".
It also has info on the name resolution ordering (if you have same name in column and table variable, column will be preferred over table variable)
Edit:
If you want to have functions which can be used in formulas, you can directly write them into the formulas, but I would suggest creating custom formulas:
Create Custom Functions
-Jarmo