Skip to content

Creating a simple read-only custom attribute on a Custom Logical Unit that pulls a field from a base table (like JT_TASK) fails, even though the exact same SQL works fine when tested directly in the SQL Query Tool.

Answer

A custom logical unit's attribute can't reference the view the way ad-hoc SQL Query Tool testing does — reference the underlying table directly instead (prefix with the table alias, not the view alias). Since OBJID typically isn't present on the base table itself, use ROWKEY instead — that means changing both the attribute's Arguments (to the table's ROWKEY) and the WHERE clause condition that compared against OBJID (to compare against ROWKEY instead). Also make sure the Select Statement is trimmed down to return only the single column the attribute actually needs, since a custom attribute's select statement generally can't return multiple columns.

← Browse Developer Studio, deployment, and upgrades questions