Home » Developer & Programmer » Forms » help mee... error in list item
help mee... error in list item [message #148732] Sun, 27 November 2005 08:12 Go to next message
norhaida_j
Messages: 4
Registered: November 2005
Location: malaysia
Junior Member

i create list item in my form.. the list item in master block. my prob is when i click the list item.. ..

WHEN-NEW-FORM-INSTANCE
---------------------------
DECLARE
company_recgrp recordgroup;
status number;

begin

company_recgrp:=create_group_from_query('company_recgrp',
'select company_name,company_name from supplier');
if not id_null(company_recgrp) then
status := populate_group(company_recgrp);
populate_list('search_supplier_contact.company_name',company_recgrp);
end if;
END;


WHEN-LIST-CHANGE
-------------------
BEGIN
SELECT
SUPPLIER.SUPPLIER_ID,
SUPPLIER.ADDRESS,
SUPPLIER.CITY,
SUPPLIER.STATE,
SUPPLIER.COUNTRY,
CONTACT_PERSON.CONTACT_ID,
CONTACT_PERSON.SUPPLIER_ID,
CONTACT_PERSON.CONTACT_NAME ,
CONTACT_PERSON.MOBILE_PHONE,
CONTACT_PERSON.EMAIL

INTO
:SEARCH_SUPPLIER_CONTACT.SUPPLIER_ID,
:SEARCH_SUPPLIER_CONTACT.ADDRESS,
:SEARCH_SUPPLIER_CONTACT.CITY,
:SEARCH_SUPPLIER_CONTACT.STATE,
:SEARCH_SUPPLIER_CONTACT.COUNTRY,
:SEARCH_CONTACT_PERSON.CONTACT_ID,
:SEARCH_CONTACT_PERSON.SUPPLIER_ID,
:SEARCH_CONTACT_PERSON.CONTACT_NAME ,
:SEARCH_CONTACT_PERSON.MOBILE_PHONE,
:SEARCH_CONTACT_PERSON.EMAIL

FROM
CONTACT_PERSON, SUPPLIER

WHERE
SUPPLIER.SUPPLIER_ID = :SEARCH_CONTACT_PERSON.SUPPLIER_ID;

EXCEPTION
WHEN NO_DATA_FOUND THEN
MESSAGE ('INVALID SUPLIER ID');
raise form_TRIGGER_failure;
END;

*** PLEASE HELP MEE!!!
Re: help mee... error in list item [message #148744 is a reply to message #148732] Sun, 27 November 2005 18:45 Go to previous messageGo to next message
ashok_it
Messages: 40
Registered: November 2005
Location: Singapore
Member
hi,

you used two table in select statement.don't have join condition. use join condition hope your problem solved.
kindly provide error message also next time.

tks

ashok



FROM
CONTACT_PERSON, SUPPLIER

WHERE
SUPPLIER.SUPPLIER_ID = :SEARCH_CONTACT_PERSON.SUPPLIER_ID;

EXCEPTION
WHEN NO_DATA_FOUND THEN
MESSAGE ('INVALID SUPLIER ID');
raise form_TRIGGER_failure;
when others then
message(' error');
END;
Re: help mee... error in list item [message #148751 is a reply to message #148744] Sun, 27 November 2005 21:22 Go to previous messageGo to next message
norhaida_j
Messages: 4
Registered: November 2005
Location: malaysia
Junior Member

i already create join condition between 2 table.. i got the result but i have to click button execute. the detail block not coming automatically...

Re: help mee... error in list item [message #148763 is a reply to message #148732] Mon, 28 November 2005 00:42 Go to previous messageGo to next message
kiran
Messages: 503
Registered: July 2000
Senior Member
@norhaida_j :
I too don't see the join condition in your query that you had written in "WHEN-LIST-CHANGE" trigger.
As Ashok mentioned , Provide us the error message if any that you may be getting.

--Kiran.
Re: help mee... error in list item [message #148785 is a reply to message #148732] Mon, 28 November 2005 02:23 Go to previous messageGo to next message
norhaida_j
Messages: 4
Registered: November 2005
Location: malaysia
Junior Member

i already change my coding into 'WHEN-LIST-CHANGE' trigger. here i attach my coding.. help you can check it..
the relentionship between 2 table is supplier_id. when i change the list item, only column supplier_id in detail block appear. my prob is, how to show the value of the detail block based on list item in master block
Re: help mee... error in list item [message #148869 is a reply to message #148763] Mon, 28 November 2005 15:59 Go to previous message
feroze
Messages: 144
Registered: September 2005
Location: chicago
Senior Member
Hi

On When List Changed trigger at master block write code to populate list of detail item and in where clause of the select statement where id= : masterblock.listitem.


Let us know how it works

Regrads
Previous Topic: make a shortcut key to my form
Next Topic: Regarding Proper Trigger
Goto Forum:
  


Current Time: Fri Sep 20 03:46:15 CDT 2024