Greetings, I searched the 6 and 7 forum and the 8 forum for an answer but did not find anything that would help so here is my question.
I have created a view where the first column is the only sorted column in the view. This first column is of Number type and is filed in via an agent with the following LS:
Call thisDoc.ReplaceItemValue(“custnum”,ControlRec)
Everything was fine until yesterday when the view started showing the sorted sequence as:
40017
40018
40000
40001
…
…
40016
Any new documents that are created end up at the top. So if I create 40019 it will show up after 40018 instead of at the bottom.
Now if I take the sort sequence off the first column, then the code in on of my forms does not retrieve the data correctly. CustCompany field ends up empty. Before document 40017 was created, everything worked perfectly.
I do understand that dblookup requires that the views first column be sorted. But somethings gone wrong somewhere…
Formulas:
(Field dolookup)
dolookup := @PickList([Custom];“”:“RBGApp/Customer.nsf”;“(vCustNum)”;“Pick a Customer”;“Please select the Main Office of the Customer”;1);
dolookup
(Field CustCompany)
CustCompany := @Text(@DbLookup(“Notes”:“NoCache”;“”:“RBGApp/Customer.nsf”;“(vCustNum)”;dolookup;2));
CustCompany
Any help would be appreciated.
EDIT: To give you an idea what I am trying to do - when the form is first opened, I need to be able to pick a company from a master listing and partially fill in two fields. If there is a better way of doing this, I am all ears to listening to the ideas.
Glen