Skip to main content
Solved

Creating a read only attribute in a custom logical unit

  • February 20, 2023
  • 2 replies
  • 319 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
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+19
  • Superhero (Employee)
  • 485 replies
  • Answer
  • February 20, 2023

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)
  • 2 replies
  • February 20, 2023

Brilliant, Thankyou !


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings