Skip to main content
Solved

Creating a read only attribute in a custom logical unit

  • Feb 20, 2023 5:50 AM UTC
  • 2 replies
  • 422 views

Forum|alt.badge.img+2

 

Hi,

I’m just trying to create a simple Read only attribute on a Custom Logical Unit that fetch’s a field from JT_TASK. Could someone please assist, I am not sure what I am doing wrong? Any help would be much appreciated. 

 

Using the SQL Query Tool I can get the SQL to work.

 

 

Best answer by Tomas Ruderfelt

In a custom logical unit you can not reference the view, so instead of v.objid you need to prefix with t. But objid is not present in the table.

Instead you can change it to t.ROWKEY

Then you have to change “A.OBJID = :OBJID” to “B.OBJID= :ROWKEY”

You also need to remove some columns in the SQL statement since it may only return one column.

 

Arguments:

t.rowkey

 

Select Statement:

SELECT a.reference_no
FROM jt_task a, a_m_e_n_d_m_e_n_t_s_clv b
WHERE b.cf$_task_seq = a.task_seq
AND b.objid = :ROWKEY

View original

2 replies

Forum|alt.badge.img+21
  • Superhero (Employee)
  • Answer
  • Feb 20, 2023 1:33 PM UTC

In a custom logical unit you can not reference the view, so instead of v.objid you need to prefix with t. But objid is not present in the table.

Instead you can change it to t.ROWKEY

Then you have to change “A.OBJID = :OBJID” to “B.OBJID= :ROWKEY”

You also need to remove some columns in the SQL statement since it may only return one column.

 

Arguments:

t.rowkey

 

Select Statement:

SELECT a.reference_no
FROM jt_task a, a_m_e_n_d_m_e_n_t_s_clv b
WHERE b.cf$_task_seq = a.task_seq
AND b.objid = :ROWKEY


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Partner)
  • Feb 20, 2023 10:06 PM UTC

Brilliant, Thankyou !