Hi there,
I'm designing a new table where one of the field needs to get its data from the "Table No." field of the table "Table Information" [field's table relation property: "Table Information"."Table No."].
Since this is a virtual table that has no list form attached to it, how can my field's lookup function be able to show the list of existent database tables?
Any ideas?
Thanks!
Redcodestudio: Web Development, FLASH & Webdesign (and a little NAV, in the future) 0
Answers
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
P.S.: I've created this topic on the wrong forum, someone please move it to the "NAV/Navision Classic Client".
You cannot use the standard lookup (by filling the LookupFormID property on the table). That's why you have to do what lvanvugt already said.... program the lookup yourself
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks! :thumbsup:
I wanted to program the table's field directly, and not the table's form, which would be easier.
I looked up around and I found that I was not the only one facing this issue, as others tried and ended up giving up, some saying it couldn't be done.
But it is possible, I'm just going to explain how to help others.
I had a table (named "Number") with an integer field ("No.") that needed to get its data from the virtual "Table Information" table. Since this is a virtual table, we can't access its design view and fill in the LookupFormID property with the list form we want.
To start, I created a list form for the "Table Information" table called "Table Information List".
Then, in the Onlookup trigger of the "No." field of the "Number" table I coded this:
The funny part is that if we run the "Number" table the lookup works fine, but it does not store the value of the rNum."No." in the "No." field. Only if, we run the form (another form, this one named "Numbers List") which has "Number" as SourceTable does the looukp work and store values.
Another issue is that, if we have any code, even if it is commented on the Onlookup (control) trigger of the form ("Numbers List"), the lookup stops working.
Thanks for all your help.