I have a calc field:

ExecuteSQL("SELECT \"__uuID\" FROM \"IO\" WHERE \"__uuID\"=?";"";"";Patient::IO_n)

that is 'text' and 'does not store calcs'. In data viewer the calc correctly gets the uuID, but the field remains empty and Data viewer indicates: <index missing>.

A different version of solution using what appeared to be the same fields and calc did work, but I haven't spotted the difference and error in the new version.

A calculation always has a context "from which" the calculation gets evaluated. You can see the context in the top left corner of the calculation window.

Is "Patient::IO_n" available from that context?