Posted by [IP Address: 208.22.104.13] 'remotedeveloper' on September 04, 2001 at 17:32:41 EST:
In Reply to: Re: Limit number of records in a prompt table posted by [IP Address: 208.22.104.13] 'ShuSheng Li' on August 30, 2001 at 12:16:52 EST:
Hi ShuSheng.
I did tried the navigation as you specified. On the Item_Id search dialog bix, you have Inventory_item_Id as the primary search key and (Business_Unit + Customer_Id) are the alternate search keys.
Your relevant Panel is Payment_Express2. The underlying record is Payment_Id_Item and it has a field - ITEM...This field has a prompt from ITEM_ITEM_VW which is based on ps_item where item_status = 'O'.
The only way you would be able to restrict the number of rows fetched in your search dialog box would be to assign a default value to Business_Unit and Customer_Id using SearchInit peoplecode event. I see a Default Business Unit on the Operator Defaults for Receivables Data Entry Panel. My guess is you may be able to do something like this,
If %PanelGroup = PANELGROUP.payment_express or
%PanelGroup = PANELGROUP.express_balance Then
&Prompt_oprid = %OperatorId;
&prompt_bu = " ";
SQLExec("Select DEPOSIT_BU from ps_opr_def_tbl_ar where oprid = :1", &Prompt_oprid , &prompt_bu );
ASSIGNMENT of &prompt_bu to the relevant prompt_Record.bu;
end-if;
Here you will have to do some research and figure out the table on which Business_Unit will get it's prompt as it probably is a derived.record kind of peoplecode. This is my guess because on the record defintion it shows up with prompt=%Edittable1
I hope this gices you enough idea to loook into it. Other suggestion I would have is are your AR Operators entering data based on fixed set of Customers? If so, consider adding Customer on the default panels as well.
Remotedeveloper