[Forms - Tables - LookUps] Show other Field than PrimaryKey
Jens_Murer
Member Posts: 6
Hello.
I hope anyone can (and will) help me - fast
)
I have 2 tables:
One containing movies, with a PrimaryKey 'OID' and - of course - the title of the movie,
the other one for storing shows in a cinema, in which the movie which is shown should be stored by a relation between the ForeignKey 'MID' in the show table and the PrimaryKey 'OID' in the movie table.
I created a form to fill in an amount of shows. I also managed to get a LookUp from the corresponding coloum 'Movie' to a form, which gives me the option to fill in one of the existing movies.
BUT: After selecting the movie, I of course get the OID of the movie which is filled into the form and - presumeably - stored into the 'ShowTable'. It would be a lot nicer, if the operator would see the title of the movie in the form.
How can i get the title of the movie into the form, but the OID of the movie into the ShowTable?
Hope, someone will help.
greetz
- jens
I hope anyone can (and will) help me - fast
I have 2 tables:
One containing movies, with a PrimaryKey 'OID' and - of course - the title of the movie,
the other one for storing shows in a cinema, in which the movie which is shown should be stored by a relation between the ForeignKey 'MID' in the show table and the PrimaryKey 'OID' in the movie table.
I created a form to fill in an amount of shows. I also managed to get a LookUp from the corresponding coloum 'Movie' to a form, which gives me the option to fill in one of the existing movies.
BUT: After selecting the movie, I of course get the OID of the movie which is filled into the form and - presumeably - stored into the 'ShowTable'. It would be a lot nicer, if the operator would see the title of the movie in the form.
How can i get the title of the movie into the form, but the OID of the movie into the ShowTable?
Hope, someone will help.
greetz
- jens
0
Comments
-
Add a 'Movie Title' field to your Show table, and make it a flowfield. Then, in the CalcFormula set the method to lookup, the table to your Movie table, the field to the title field, and the table filter to MID=FIELD(OID) or something like that. Then, All you need to do is put the movie title on your form and Navision will take care of everything.
The Movie Title field will actually never physically contain a value in the Show table, but it will show a value when the field is put on a form (or when you do a CALCFIELDS in C/AL Code).
HTH0 -
Hi.
Yes, we tried that one, but it doesn't work, don't ask me why, we REALLY tried to make this work.
We now found some C/AL Code in Table 18 - Costumers, which reacts 'onValidate' and gets the Value, will try this next.
- jens0 -
Then you're not doing it right. If you set up your flowfield correctly (i.e. the relation to the other table), it shows the other field from the other table.0
-
Of course I'm not doing it right, but I can't find the mistake. We now put a little code on the onValidate - Trigger (Why aren't they called 'Events' like everywhere else?) and it works.
Look out for my forthcoming questions on this board ;o)
greets and thanks
- jens0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
