problem with filtering the dropdownlist in scroll window
Posted
by Rahul
on Stack Overflow
See other posts from Stack Overflow
or by Rahul
Published on 2010-05-14T06:10:35Z
Indexed on
2010/05/14
6:14 UTC
Read the original article
Hit count: 439
great-plains
Hi all,
Problem with filtering Dropdown list.
The scenario is : in scroll window there are two fields Document types and type id: Document type is Dropdown list: As per document type selection type id look should display the values. For ex. If I select quote type from document type and if I open type id look up it should display only quotation in the look window. It should work for all the values of document type drop down list values. Its working fine. The item in the document types are: Quote, Order, Invoice, Return, BackOrder. The problem is after saving the data when I am displaying the same record in scroll window, suppose after displaying document type is QUOTE and document id is QTOARD, and in this position I am changing the document type from dropdown QUOTE to ORDER at this time warning message should c ome this range entered is in valid. Because in database table there is no document QTOARD for ORDER type. The same should work for all the condition. The table name is SOP_ID_Setp and key is SOP Type and DocumentID.
For that I have written the Stored procedure :
create procedure DocTypeFilter @DocumentType as int, @DocumentID as varchar(30) as --declare --@documentype int, --@documentID varchar(30), select * from sop40200 where soptype=@DocumentType and docid=@DocumentID
and I have called this SP in Dropdownlist change event.
local long retcode;
range clear table SOP_ID_SETP;
clear field 'SOP Type' of table SOP_ID_SETP;
clear field 'Document ID' of table SOP_ID_SETP;
range start table SOP_ID_SETP;
fill field 'SOP Type' of table SOP_ID_SETP;
fill field 'Document ID' of table SOP_ID_SETP;
range end table SOP_ID_SETP;
if err()=OKAY then
call DocTypeFilter,retcode,'Document Type' of window 'Is_Document Type Site_Scroll','Document ID' of window 'Is_Document Type Site_Scroll';
else
warning "The range entered is invalid";
clear window 'Is_Document Type Site_Scroll';
fill window 'Is_Document Type Site_Scroll' table is_sop_site_line_temp;
end if;
Above code not giving the expected output any help pls.
© Stack Overflow or respective owner