Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle forms tabulal records checkbox

user10991018Feb 19 2021

Hi
I have a requirement in oracle forms as follows
i will have a multirecord blcok with sample data and sec_suprvisory is the UI item to check if that client has more than one supervisor
i wrote function but it is always returning the count as more than 1 but i want to show for same client if have more than one primary supervisor for eg 1315
only two secsup checkbox to be checked and the second one should not be checked as second row is primary supervisor. can you please advise.
thanks very much
image.png
sample data
CREATE TABLE "EMP_SUP"
( "CLIENT_ID" NUMBER(4,0),
"PRIMARY_SUP" VARCHAR2(20 BYTE)
)

Insert into EMP_SUP (CLIENT_ID,PRIMARY_SUP) values (1315,'N');
Insert into EMP_SUP (CLIENT_ID,PRIMARY_SUP) values (1315,'Y');
Insert into EMP_SUP (CLIENT_ID,PRIMARY_SUP) values (1314,'Y');
Insert into EMP_SUP (CLIENT_ID,PRIMARY_SUP) values (1315,'Y');
Insert into EMP_SUP (CLIENT_ID,PRIMARY_SUP) values (1315,'N');
create or replace FUNCTION SECSUP_IND
RETURN VARCHAR2 IS

ln_SECSUP_cnt NUMBER;
lv_SECSUP_ind VARCHAR2(2);
lv_SUP_IND VARCHAR2(2);
BEGIN
SELECT
count(1)
INTO ln_SECSUP_cnt
FROM EMP_SUP
WHERE EMP_SUP.CLIENT_ID=:client_id
AND PRIMARY_SUP='N';

 IF ln\_SECSUP\_cnt >= 1 THEN  

lv_SECSUP_ind := 'Y';
ELSE
lv_SECSUP_ind := 'N';
END IF;
RETURN ( lv_SECSUP_ind );
END SECSUP_IND;

Comments

The Explorer

Hi,
Please make sure that listener has been started and you are able to tnsping it.
Thanks

EdStevens

Well, he did say
After trying to start the listener, i am getting the error
Failed to start listener service, error 2: The system cannot find the file specified.

EdStevens

So the first thing seems to be to get your listener started.
What OS is the database installed on?
From the database server, show us the contents of 'listener.ora' and 'sqlnet.ora'. When you post it, please format it as 'code'. (https://community.oracle.com/tech/apps-infra/kb/articles/12-format-text)

1 - 3

Post Details

Added on Feb 19 2021
4 comments
257 views