The Big Picture Of NAV v2

Administrator
Member, Moderator, Administrator Posts: 2,506
The Big Picture Of NAV
This tool will export all table relations for the selected NAV DB. Just export all tables as .txt file, import these objects into the DB, run the form 66000, select the TXT file, set the options and process. If you let the process to fill the table, you can browse the relations by running form 66001 (you can renumber the objects in the txt format to be able to run them).
This tool was used to create complete diagram of table relations with name "The Big Picture Of NAV".
http://www.mibuso.com/dlinfo.asp?FileID=990
Discuss this download here.
This tool will export all table relations for the selected NAV DB. Just export all tables as .txt file, import these objects into the DB, run the form 66000, select the TXT file, set the options and process. If you let the process to fill the table, you can browse the relations by running form 66001 (you can renumber the objects in the txt format to be able to run them).
This tool was used to create complete diagram of table relations with name "The Big Picture Of NAV".
http://www.mibuso.com/dlinfo.asp?FileID=990
Discuss this download here.
0
Comments
-
I got an error message while importing the text. It happens within the function SplitLine, in the "sector" "Separate Target table name from target field name" and with the statement "PKField := COPYSTR(Table,Pos) + PKField;"
The problem is that the field Pos contains zero (which is invalid).
Please contact me if I can help you to find this bug.0 -
I too had this same error.
After a bit of debugging it looks like the tool does not handle when a field relation doesn't define the field, only the table.
For example create a field in the Location table called "Manufacturing Location Code" and relate it to the Location table. Make sure in the table relation you do NOT specify that it is the Code field. this is course allowed because the Location table has a single field primary key.
This will cause it to error.
Changing the table relation to "Location.Code" causes the error to go away.
Can we get a fix for this?0 -
I also got these errors when I tried these objects.
After some debugging I made the following changes to form 66000 and got it to complete the text import without errors.
1. Change both occurrances ofIF STRPOS(Line,';')>0 THEN EndLoop := TRUE;
toIF (STRPOS(Line,';')>0) OR (STRPOS(Line,' }')>0) THEN EndLoop := TRUE;
2. ChangeEndLoop := STRPOS(Line,';') <>0;
toEndLoop := (STRPOS(Line,';') <>0) OR (STRPOS(Line,' }')<>0);
3. In REPEAT after //*****Separate Target table name from target field name make the following changesTable := DELCHR(Table,'<>','"; ');
should beTable := DELCHR(Table,'<>','";} ');
andPKField := COPYSTR(Table,Pos) + PKField; Table := COPYSTR(Table,1,Pos-1);
should beIF Pos > 0 THEN BEGIN PKField := COPYSTR(Table,Pos) + PKField; Table := COPYSTR(Table,1,Pos-1); END ELSE BEGIN Table := DELCHR(Table,'>',' }'); END;
There is still a potential bug with this, if a table which is specified in TableRelation doesn't exist in the database the REPEAT goes into infinite loop because Name will never match ObjectBuffer.Name
I hope this will help someone.0 -
Ok, thanks for the feedback. I was on holidays...
It is interesting, that I didn't have this error. Which NAV version objects you were importing? Can you send me the text file of the object, on which it is crashing? I want to reproduce it and change the logic according that...0 -
Just wants to add that the code is based on analysis of txt file exported by NAV 5.00SP1. It seems that you have found construction of the TableRelation I didn't had in the cronus objects.
If someone can post the whole block of the TableRelation definition from the text file on which this happen, I will be happy. I need the part from "TableRelation=" line to next property or field definition (+prev and next line).
Thanks0 -
-
Thanks to rainergaiss I know now what is the problem. Boys, your objects does not fulfill main guidelines - there is caption missing on the field and it is why you have this problem. In this case, and if you did not set any other property on the field, the definition of the field is only on one line, and it means that the table relation ends with character '}'. ;-)
In this case, the } is like ; and the patch described by SigGunn is the correct solution.
example of problematic text:{ 50001; ;Field Name;Code20;TableRelation=RelTable.Field }
0 -
Thank you so far to everybody!
Rainer0 -
I assume that tomorrow I will send new version to Luc for publishing. It will include also all relations made through FlowFields!!! 8) :whistle:0
-
The Big Picture Of NAV v2
These objects can be used to extract TableRelations data from txt file with definition of all tables in the database.
How to use:
1) Import the objects into your DB
2) Run the form 66000
3) Set the parameters
4) Click the button
5) If you selected to fill the table, you can run the form 66001 and browse the relations there. You will see all refered and all referring fields for the selected field.
Version 2.0 changes:
1) "One line field definition" bug removed (patch from SigGunn)
2) New field "Relation Type" added
3) CalcFormula= definition is now parsed too - now the relations includes all relations made through FlowFields and TableRelation
http://www.mibuso.com/dlinfo.asp?FileID=990
Discuss this download here.0 -
I hope that everybody enjoy the relation hell of your own databases... :-)
Any ideas for making the tool better are welcome...0 -
Found an issue with the flowfield parsing. If you have a COUNT flowfield with no "where" condition, the tool hangs endlessly when reading in the text file.
Problem Field definition:{ 2 ; ;CounterField ;Integer ;FieldClass=FlowField;CalcFormula=Count(Location) }
I don't know if this is limited to COUNT or if all flowfields set up like this are affected.
Also, it would be nice if a field is defined using a non-existent table that the tool errors. Right now it just hangs as well on reading in the test file. I know normally a field should not be related to a non-existent table but it does happen if you are moving objects around multiple databases and you forget some. :roll:0 -
1) Yes, I make small changes to prevent the endless loop, I will check if the published version includes that or I will upload never version...
2) Problem with the example is, that there is no Caption for the field and it means the whole definition is on one line. I didn't count with that because I expected "correct" definition of fields (including ENU language at least).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