How to mimic AutoFormatExpr in RTC

DKFFox
Member Posts: 12
I've seen discussions acknowledging that AutoFormatExpr works differently between RTC and classic but nobody seems to have suggested a solution that works for me.
The problem is this:
I have a Nav table linked to a sql view. The sql view does a select * from a sql table. This sql table has several numeric fields which link to other tables, where the field descriptions are stored.
In classic client you can have an autoformatexpr on a table field which looks up the description in another table and returns it so that the form shows the description instead of the number.
In RTC this doesn't work. The workaround is to use a flowfield to return the description and show both the number and the description on your page but this looks a bit ugly especially when RTC is in charge of rendering. Does anyone know a better way?
Apparently it is possible to use dot net to achieve this - does anyone have an example with code?
The problem is this:
I have a Nav table linked to a sql view. The sql view does a select * from a sql table. This sql table has several numeric fields which link to other tables, where the field descriptions are stored.
In classic client you can have an autoformatexpr on a table field which looks up the description in another table and returns it so that the form shows the description instead of the number.
In RTC this doesn't work. The workaround is to use a flowfield to return the description and show both the number and the description on your page but this looks a bit ugly especially when RTC is in charge of rendering. Does anyone know a better way?
Apparently it is possible to use dot net to achieve this - does anyone have an example with code?
0
Comments
-
Hi there,
I have the same fashion issue. Having field No and flowfield Description to show the description of the selected No. is fine, but on a page it would be nice to have these fields next to each other.
Eg. Vendor no. on item card.
It looks like this :
Vendor No : 0101010
Vendor description : Cronus Ltd.
I prefer :
Vendor No. : 0101010 Cronus Ltd.
Did you find a solution?0 -
Is there some scenario here that prevents you from creating a function in the table to return the string you want? Then you'd just set the field to that source expression (the function name) and set the Caption property for it.
i.e.
GetVendorNoName(): Text(100)IF NOT lrecVendor.GET("Vendor No.") THEN EXIT("Vendor No."); EXIT("Vendor No." + ' ' + lrecVendor.Name);
Rob Hansen
http://www.epimatic.com0
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