Home » Developer & Programmer » Forms » Need Help In Oracle Forms (Lov ) (Oracle Forms 6i)
Need Help In Oracle Forms (Lov ) [message #668832] Fri, 16 March 2018 06:48 Go to next message
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 #668833 is a reply to message #668832] Fri, 16 March 2018 07:57 Go to previous messageGo to next message
joy_division
Messages: 4949
Registered: February 2005
Location: East Coast USA
Senior Member
1) How about when-validate-item and set_item_property?
2) Entering or querying? post-query? You don't call a view from a form, so I am not quite sure what you are asking.
Re: Need Help In Oracle Forms (Lov ) [message #668841 is a reply to message #668833] Fri, 16 March 2018 14:55 Go to previous messageGo to next message
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..

/foru/forum/fa/13793/0/
  • Attachment: Capture.PNG
    (Size: 1.21KB, Downloaded 404 times)
Re: Need Help In Oracle Forms (Lov ) [message #668842 is a reply to message #668841] Sat, 17 March 2018 05:23 Go to previous messageGo to next message
Djpats
Messages: 17
Registered: January 2018
Junior Member
Hi Guys,

Any advise or guidance would be greatly appreciated.
Re: Need Help In Oracle Forms (Lov ) [message #668843 is a reply to message #668842] Sat, 17 March 2018 12:39 Go to previous messageGo to next message
Littlefoot
Messages: 21528
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;
Re: Need Help In Oracle Forms (Lov ) [message #668919 is a reply to message #668832] Thu, 22 March 2018 12:57 Go to previous message
Djpats
Messages: 17
Registered: January 2018
Junior Member
Thanks a lot.. It Worked
Previous Topic: frm - 40039 can't attach PL/SQL Library
Next Topic: oracle forms 6i runform has stopped working windows 7
Goto Forum:
  


Current Time: Fri Jan 17 08:42:49 CST 2020