How can I extract info from a field name?

I have a table where there are fields with formulas that extract info from other fields in the table. The formula varies for each field and is related to the field title. I use the number after the “t” for part of the calc and the number after the “s” for another part of the calc.

To simplify my formula, I’d like it to extract the 2 numbers from the field description and use them in the calculation. It would also ensure that I don’t have mistakes in the fields since they would then all use the same formula.

How can I extract the info from the field title? I thought it was " $ColumnID", but when I made the field equal to that, I got an error.

First I need to be able to read the field description, then parse out the values

My excel analogy is I would have a title at the top of the column. I would have a formula for each column that parsed the 2 numbers from the title and used them in the formula for each row. Then the formula for each column would be the same except for substituting the numbers from each individual column title.

Any help is appreciated

image

There is a hacky way described here.

In essence its this formular:

table.table._engine._current_node.col_id

So you could go for (warning ugly list comprehension + spaghetti code ahead):
[int(x) for x in str(table.table._engine._current_node.col_id).strip("t").split("s")]

that works perfectly. thanks