Skip to main content

Hi Experts,

I have 3 custom attributes(all are NUMBER format) in page ‘Customer’. They are LIST1,LIST2 and LIST3. The corresponding view is CUSTOMER_INFO_CFV. I want to add another custom attribute in work task page as TOT_LIST, which is also a number and should equal to sum of LIST1,LIST2 and LIST3.The corresponding view is  JT_TASK_LIGHT_UIV

I know that I have to add a Read only type custom field in JtTask entity. I tried select statement, but was not successful(I can’t perform addition operation in a select statement ?) and then switched to use ‘Expression’ option and I am still not getting anywhere as I see. My sql knowledge is not that good either. Can someone help me pasting the required sql here pls ?

Below is the expression I tried

DECLARE

v.CUSTOMER_NO;        

Begin

select

CF$_LIST1,CF$_LIST2,CF$_LIST3 from CUSTOMER_INFO_CFV t where t.CUSTOMER_ID =:CUSTOMER_NO;

CF$_TOT_LIST=CF$_LIST1+CF$_LIST2+CF$_LIST3;

End;

Thank you,

Roshan

Hi ​@wrprabash,

It is quite simple. Please refer to the screenshots below.

  1. Created 3 custom fields for the Customer screen.
  1. Created another Custom field for entity JtTask and enabled it for JT_TASK_LIGHT_UIV view using the Additional Views command.
  1. Added field on Work Tasks screen having sum of List 1, List 2, and List 3.

Hope this helps.

 

Regards

Abdul Rehman


Hi ​@wrprabash,

It is quite simple. Please refer to the screenshots below.

  1. Created 3 custom fields for the Customer screen.
  1. Created another Custom field for entity JtTask and enabled it for JT_TASK_LIGHT_UIV view using the Additional Views command.
  1. Added field on Work Tasks screen having sum of List 1, List 2, and List 3.

Hope this helps.

 

Regards

Abdul Rehman

Hi Abdul,

Thank you !. Yes it works for me as well. I will mark this as the best answer. In the meantime out of my curiosity, is there a way we can do the same using expression option ?

Thank you,

Roshan


HI ​@wrprabash,

Yes, for Expression, I would use the Api Getter functions.

Please refer to the screenshot below.

 

CUSTOMER_INFO_CFP.GET_CF$_LIST_1(CUSTOMER_INFO_API.GET_OBJKEY(CUSTOMER_NO)) + CUSTOMER_INFO_CFP.GET_CF$_LIST_2(CUSTOMER_INFO_API.GET_OBJKEY(CUSTOMER_NO)) + CUSTOMER_INFO_CFP.GET_CF$_LIST_3(CUSTOMER_INFO_API.GET_OBJKEY(CUSTOMER_NO))

 

Regards

Abdul Rehman


Reply