I have a form where in a user is allowed to enter/delete the records to a table using buttons(ADD/DELETE) and SAVE AT ONCE (commit_form). I have a lov as one of the fields which fetches the data from a different table.
My requirement is mentioned as below.
I have entered a record by clicking the ADD button . this record has the column MIS(selected from the LOV). lets say the value is 1000.
when i click the ADD button again, to enter the second record, the LOV MUST NOT SHOW the value 1000.
i tried adding the parameter to hold the previous values and using this parameter in the RG query but it is not accepting.
Create global temporary table to store the values. Use not in <GTT> command to filter the values from LOV.
First of all create temp. table as follows:
create global temporary table my_tmp (mis number) on commit delete rows;
On forms write the following code in when-validate-item trigger of MIS field:
insert into my_tmp values(:mis);
Modify the existing record group of your LOV and append the following:
.....and mis not in (select mis from my_tmp);
Hope this will help.
Message was edited by: Priyasagi