I'm attempting to create a new lookup window for my GP application plugin.
The lookup itself is working - ie filling the scrolling window, and returning a value, but I cannot get it to set a range.
I created a form procedure for the form called Initialize so the lookup is opened this way:
and here is the Initialize code:
I have tried various combinations of the "fill window" statement including "fill window EC_User_Lookup_Scroll table EC_User by EC_User_Key4".
EC_User_Key4 contains only one key segment that is indexed ('Customer Number').
The warning message (which I'm only using for debugging purposes in a multi-dictionary environment) is correctly showing the Customer Number and the number of records for that customer number - yet the scrolling window still shows the records for EVERY customer number - not just the one specified in the range.
Any ideas on what I can do to get the scrolling window to show only the records for the passed Customer Number?
Thanks.
The lookup itself is working - ie filling the scrolling window, and returning a value, but I cannot get it to set a range.
I created a form procedure for the form called Initialize so the lookup is opened this way:
Code:
open form EC_User_Lookup return to 'Login';
call Initialize of form EC_User_Lookup, 'Customer Number';
Code:
in 'Customer Number' sCstnmbr;
local long num_records;
range clear table EC_User;
'Customer Number' of table EC_User = sCstnmbr;
range start table EC_User by EC_User_Key4;
'Customer Number' of table EC_User = sCstnmbr;
range end table EC_User by EC_User_Key4;
num_records = countrecords(table EC_User);
warning "Using CustNMBR: " + sCstnmbr + " (" + str(num_records) + ")";
fill window EC_User_Lookup_Scroll;
EC_User_Key4 contains only one key segment that is indexed ('Customer Number').
The warning message (which I'm only using for debugging purposes in a multi-dictionary environment) is correctly showing the Customer Number and the number of records for that customer number - yet the scrolling window still shows the records for EVERY customer number - not just the one specified in the range.
Any ideas on what I can do to get the scrolling window to show only the records for the passed Customer Number?
Thanks.