How to display of the description of a related field?

boby
Member Posts: 78
Hello,
I'm a newbie in RTC, and I try to display the value of a field related to anoher table..
For example, in the item card, the payment method is "1", which is the code corresponding to "bank transfer" in the payment method table.. And I'd like to display "bank transfer" in place of (or beside) "1" in the item card..
Can you give me some tricks to do that??
Thanks for reading ;-)
I'm a newbie in RTC, and I try to display the value of a field related to anoher table..
For example, in the item card, the payment method is "1", which is the code corresponding to "bank transfer" in the payment method table.. And I'd like to display "bank transfer" in place of (or beside) "1" in the item card..
Can you give me some tricks to do that??
Thanks for reading ;-)
0
Comments
-
To display it on RTC you have to add a new item on Page Designer having SourceExpr PaymentMethod.Description and get the value on Product Group Code - OnValidate() as:
IF NOT PaymentMethod.GET("Payment Method") THEN PaymentMethod.INIT;
Ufuk Asci
Pargesoft0 -
Thank you very much for your answers, but I've tried to put in the onaftervalidate of a custom field in the item table, the "label.field:=" causes a compilation error (undefined variable "label")..
What Am I doing wrong?
PS: I miss my old "classic" client ;-)0 -
Hello,
Thank you for your interest.
In fact, I'm wrong in my example :oops: . I've created a table Colors, and added a field color in the item table. In the color table, I've a field code (related to another system, so I can't rename it) and a field description. I'd like to display the description of the color (blue, red...) and not the code (which make the link, but is 001,002,003)..
I hope I've made it more easy to understand.
I guess I've to work in the Page, not in the Table..
Thanks again for your advices
Boby0 -
If understand you:
1. There is a new field in Item table:
a. Color Code
b. Color Description
2. I think you want the Color Description in Item table is updated when you fill the Color Code
If so:
1. Design Item table
2. Add code in Color Code - OnValidate:recColor.GET(recItem."Color Code"); "Color Description" := recColor."Description";
3. This way, the Color Description in Item table will be populated when you input the Color Code
4. This way too, you will see it on the Item page, since the information (record) to display in page are now available from it's table 8)Regards,
Andwian0 -
Thank you for your advice..
I don't want to repeat the field already present in a separate table "color".. The item table is already very heavy (>10000 items) and the color description is quite long (250 characters)..
Any other idea?0 -
If you do not want description field to be exist in your table, then just use a variable as I mentioned before and add it to the appropriate place in Page Designer.Ufuk Asci
Pargesoft0
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