Answer
Check that the column you're referencing actually exists in the specific base view backing that entity — a column can exist in the underlying table without being exposed on the view the custom attribute's SQL runs against, which produces exactly this error; where the value you need lives on a related record instead, resolve it through the appropriate lookup function (passing the record's own key fields) rather than referencing a column that isn't actually on that view.