Need Help In Oracle Forms (Lov ) [message #668832] |
Fri, 16 March 2018 06:48  |
Djpats
Messages: 17 Registered: January 2018
|
Junior Member |
|
|
Hi, Guys
i have 2 requirements,
1) i have two LOV's in form for Searching Records , so my requirement is like, when i Select 1st Lov's (value), 2nd Lov must be disable. & vice versa..
2) I have One Status Column in a form, & that Status Column I m calling from View. which is Showing Status like O and C, for this
I want to set an Alias as Open & Close For Display Purpose...
Quick Help will be Appreciated...
Thanks In Advance..
|
|
|
|
Re: Need Help In Oracle Forms (Lov ) [message #668841 is a reply to message #668833] |
Fri, 16 March 2018 14:55   |
Djpats
Messages: 17 Registered: January 2018
|
Junior Member |
|
|
Hi, Thanks for Your Reply
but,
In my First Scenario.
i have 2 lov Fields with lots of values,
so my requirement is Either User select Lov1 (values) or Lov2(values)
suppose User select Lov1 values randomly the Lov2 value or Lov2 field Must be disable.
so how can i do this with set_item_property?
And in my 2nd scenario,
i have 3 fields
Invoice_Number (LOV)--- Invoice_Amount--- Invoice_Status.
When I am Selecting Invoice_Number From LOV, Invoice_Amount & Invoice_Status Displaying Automatically.
Because i m using Query(SELECT DISTINCT INVOICE_NO,INVOICE_STATUS,INVOICE_AMOUNT FROM ALL_OPEN_INVOICE_V)in A Record Group..
so,here values of Invoice_Status Are 'O' & 'C' Which are coming from All_Open_Invoice_V View..
I want to Display This values as 'Open' & 'Close' on Front end..
please Have a look at Below Image..
-
Attachment: Capture.PNG
(Size: 1.21KB, Downloaded 1994 times)
|
|
|
|
Re: Need Help In Oracle Forms (Lov ) [message #668843 is a reply to message #668842] |
Sat, 17 March 2018 12:39   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
First part of your question: did you investigate what SET_ITEM_PROPERTY does? If not, open Forms Online Help System and read it. Basically, you'd use WHEN-VALIDATE-ITEM trigger which checks whether item value exists and disables another item. Something like this:
-- WHEN-VALIDATE-ITEM trigger on ITEM_1
if :block.item_1 is not null then
set_item_property('block.item_2', enabled, property_false);
else
set_item_property('block.item_2', enabled, property_true);
set_item_property('block.item_2', navigable, property_true);
end if;
WVI trigger on ITEM_2 would look just the same, you'd only disable another item.
As of your second question: modify query:
SELECT DISTINCT INVOICE_NO,
decode(INVOICE_STATUS, 'o', 'open', 'c', 'close', 'other') invoice_status,
INVOICE_AMOUNT
FROM ALL_OPEN_INVOICE_V
Alternatively, add another (display) item and populate its value in WHEN-VALIDATE-ITEM trigger for newly added values and POST-QUERY while querying existing ones, such as
:block.invoice_status_desc := case when :block.invoice_status = 'o' then 'open'
when :block.invoice_status = 'c' then 'close'
else 'other'
end;
|
|
|
|