Defining a value set on any DFF will disallow to search records having non eligible (out of value set range) segment values.
A good example of this is to create a DFF of segment project task name. Initially associate a value set of Table type which shows all tasks from pa_tasks_all.
We create some records using assigned DFF. After sometime update value set definition to restrict disabled/end dated tasks.
Now search for records which has been created earlier and having disabled tasks assigned. Oracle form will throw below error message –
Approach – Try restricting the validation query while search.
Solution – We faced similar issue and did below steps to overcome issue –
1) Created a profile (XXXXX_SANDEEP_PRF) and set value as N
2) Updated the value set query as
Current condition –
WHERE sysdate between start_date and nvl(completion_date,sysdate)
Updated Condition –
WHERE (sysdate between start_date and nvl(completion_date,sysdate))
OR
(nvl(:$PROFILES$.XXXXX_SANDEEP_PRF,'Y')='N')
4) Set the profile value =Y, when in Edit mode. This will fail the second condition and only first
condition will be valid and so only active task will appear in LOV.
Set the profile value = N when in search mode. First condition will be failed since task is
end dated but profile condition will pass and so record will appear without error.
5) Did not try this in same form. We have created 2 form functions ( Entry (profile Y) and
Enquiry (profile N) mode)
No comments:
Post a Comment