Lookup Problem

ravi_navision
Member Posts: 102
Hi experts,
In my new table, for one of the field, I used the table relation property as : Vendor.No. WHERE (Vendor Posting Group=CONST(FREIGHT))
When I click on lookup for first time, it takes me to vendor list (first record). It's fine. After selecting a record, when I again click on lookup it takes me to the vendor list first record. I want to point to the same record in the vendor list which I selected earlier. Can I do this with any property?
In my new table, for one of the field, I used the table relation property as : Vendor.No. WHERE (Vendor Posting Group=CONST(FREIGHT))
When I click on lookup for first time, it takes me to vendor list (first record). It's fine. After selecting a record, when I again click on lookup it takes me to the vendor list first record. I want to point to the same record in the vendor list which I selected earlier. Can I do this with any property?
~~ravi
0
Comments
-
check in your Vendor List the Property "SourceTablePlacement"
What is there the value :?:Do you make it right, it works too!0 -
it is as <Saved>~~ravi0
-
ok, back to the question:
you select a vendor, the courser is on the first rec. in your open list form -> you press OK and the "Vendor no." is now in your field.
1. Then you leave the line and go to a blank line and you will there select a new Vendor
or
2. press F6 in your line where the "Vendor no." is inserted :?:
If 2. and you press F6, in the opend Vendor List form the courser isn't on the vendor no from where youv'e selected :?:
3. which version / which application?Do you make it right, it works too!0 -
I select a vendor, the courser is on the first rec. in my open list form -> I selected 2 nd record -> press OK and the "Vendor no." is now in my field.
Now I press f6 in my field -> list form opened , but the courser is again on the first rec (I want courser should point to 2nd record)~~ravi0 -
is in your "Vendor List" Form. in OnOpenForm() Trigger source like findset, find('-') or findfirst ?
because normaly the last selected record will be displayed (this was my reason for the property SourceTablePlacement)Do you make it right, it works too!0 -
I checked the form. There is no code in onopen form. Properties are also same as of base form.
still the same problem.~~ravi0 -
I tested for other examples (location). Those are working fine. I don't unserstand why it's not working for Vendor~~ravi0
-
Interesting
If I remove the “Vendor Posting Group” from secondary key list of vendor table, the requirement what I need is working. But I can’t do that.~~ravi0 -
Hi garak,
Can you give me any solution. we are using Nav4.01-SQL
Thanks !~~ravi0 -
Can we solve with coding(on-lookup code)?~~ravi0
-
if you search the forum for Lookup (i know there are 1000's) but if you scroll thru the topics you should find your answer on how to do it with code.0
-
The problem is, with the Table relation Property like
Vendor.No. WHERE (Vendor Posting Group=CONST(XYZ))
you fired up an SQL statement like this (on this reason i ask you what u are using Native / SQL).SELECT *,DATALENGTH("Picture") FROM "Database"."dbo"."CRONUS AG$Vendor" WITH (INDEX("$2")) WHERE ("Vendor Posting Group"='XYZ') AND ("No_">='123456') ORDER BY "Vendor Posting Group","No_"
The problem here ist the order by statement. So, if you check your vendor list, the property SourceTableView is <Undefined>. If you change this to SORTING(No.) you problem is no problem. But note, now, ever you open the vendor list, the form will ever use the sort order No. And this could be a problem, if you open this form via Code likevendor.reset; vendor.setcurrentkey(YourKey); vendor.setrange(YourField,YourFilter); .... form.run(0,Vendor); and u will use a other sort order .....
So if there are many datas in your filtercriteria (setrange) the form must reorder the records when opened ...
Hope understandable.
For the lookup trigger solution, search the forum, there are some post about this theme (author garak, savatage, waldo, kine, DenSter, etc ...)
RegardsDo you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions