"Table Information" List (Coding Field's Onlookup Trigger)

redhotmustang
Member Posts: 91
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!
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
-
Build a form for it yourself and program the lookup.0
-
I did that, but the issue is I can't attach the form to the LookupFormID property of the "Table Information" table because it's virtual, i.e. does not exist, then we can't access its design. Thus, my field's lookup function won't be able to show that form list.
P.S.: I've created this topic on the wrong forum, someone please move it to the "NAV/Navision Classic Client".Redcodestudio: Web Development, FLASH & Webdesign (and a little NAV, in the future)0 -
-
[Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Oops... :oops: I was sleeping there... I didn't even notice there was a link there, nor did I remember to use the OnLookup trigger... ](*,)
Thanks! :thumbsup:Redcodestudio: Web Development, FLASH & Webdesign (and a little NAV, in the future)0 -
I encountered a few problems when programming the field's Onlookup trigger.
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:rNum.RESET; // rNum - Table "Number" Record variable rNum.SETFILTER("No.",'>1'); // Apply filter // Runs the form "Table Information List" that I created. IF FORM.RUNMODAL(FORM::"Table Information List", rNum) = ACTION::LookupOK THEN BEGIN VALIDATE("No.", rNum."No."); // Validates and assigns the value of rNum."No." to the "No." field of the "Number" table END;
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.Redcodestudio: Web Development, FLASH & Webdesign (and a little NAV, in the future)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