Absent Member.. RRK_19 Absent Member..
Absent Member..
328 views

How to populate a field using table component??

Hi,

 

I have a field "Budget" which is having a validation query as follows:

SELECT tbl.parameter1||' - '||tbl.parameter2||' - '||tbl.parameter3, tbl.parameter1||' - '||tbl.parameter2||' - '||tbl.parameter3

FROM    KCRT_TABLE_ENTRIES_V tbl        

INNER JOIN KCRT_REQUESTS_V req on (req.REQUEST_ID = tbl.REQUEST_ID  

     and req.REQUEST_TYPE_NAME = 'X_RT_Process_Parameter'     and req.BATCH_NUMBER = 1)  

INNER JOIN KNTA_PARAMETER_SET_FIELDS psf on (psf.parameter_set_field_id=tbl.parameter_set_field_id                     and psf.parameter_token='X_RTF_BDG_CD_LIST')

ORDER BY tbl.seq;

 

When this field gets populated, i want to automatically populate another field (based on the selected value) I used the below query to achieve the same, but it is not working.

SELECT tbl.parameter6

from KCRT_TABLE_ENTRIES_V tbl  

INNER JOIN KCRT_REQUESTS_V req on (req.REQUEST_ID = tbl.REQUEST_ID   and req.REQUEST_TYPE_NAME = 'X_RT_Process_Parameter'   and req.BATCH_NUMBER = 1)

  INNER JOIN KNTA_PARAMETER_SET_FIELDS psf on (psf.parameter_set_field_id=tbl.parameter_set_field_id                       and psf.parameter_token='X_RTF_BDG_CD_LIST')

  where tbl.parameter3 in (SELECT SUBSTR('[REQD.P.X_RTF_BDG]',   (INSTR('[REQD.P.X_RTF_BDG]','-',1,2)+1),length('[REQD.P.X_RTF_BDG]')) FROM dual)  

and tbl.parameter1 in (SELECT (SUBSTR('[REQD.P.X_RTF_BDG]',1,(INSTR('[REQD.P.X_RTF_BDG]',' -',1,1))) )from DUAL)  ;

 

Can you please provide some suggestion how this can be done?

 

Thanks!!

0 Likes
1 Reply
Established Member.. Utkarsh_Mishra
Established Member..

Re: How to populate a field using table component??

In your Rule, check whether your query (2nd one) is returning correct result. To validate just append any character at the end of your SQL, so that it fails to execute and then go to server.log to get the SQL. 

 

This SQL will have the resovled TOKEN values, run this SQL in any oracle tool and check whether it is working as expected.

 

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.