Sorting on Var Value in List Page

DanielF
Member Posts: 21
Hello eyeryone,
following issue:
I added a Field to a Table. The Value is calculated by OnAfterGetRecord-Trigger in List Page. Now when sorting on the Coloumn of this Field in List Navision shows a different amount of Records in the List Page.
Example:
Navision 2015 Demo Database.
Table Vendor extended by Integer Variable.
Function in Table Vendor to assign Value to Variable.
Function gets Called in OnAfterGetRecord-Trigger on Vendor List Page.


Can I fix this?
Work around disabling sorting on whole List is possible - is this possible only for Variable Coloumn?
Kind Regards
Daniel
following issue:
I added a Field to a Table. The Value is calculated by OnAfterGetRecord-Trigger in List Page. Now when sorting on the Coloumn of this Field in List Navision shows a different amount of Records in the List Page.
Example:
Navision 2015 Demo Database.
Table Vendor extended by Integer Variable.
Function in Table Vendor to assign Value to Variable.
Function gets Called in OnAfterGetRecord-Trigger on Vendor List Page.


Can I fix this?
Work around disabling sorting on whole List is possible - is this possible only for Variable Coloumn?
Kind Regards
Daniel
0
Comments
-
Hi,
There was no need to add an extra field in Vendor table. All you need is a global variable on the Page, this variable needs to be used in SourceExp in the column, and its value needs to be calculated in OnAfterGetRecord - that's it. NAV will not let you to sort using that column.
Slawek
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Hi Slawek_Guzek,
thanks for your reply. Yes I was wrong - I changed to Var on Page.
Kind Regards0 -
Slawek_Guzek wrote: »Hi,
There was no need to add an extra field in Vendor table. All you need is a global variable on the Page, this variable needs to be used in SourceExp in the column, and its value needs to be calculated in OnAfterGetRecord - that's it. NAV will not let you to sort using that column.
Slawek
Sorting/Filtering in List page is not available on control which source expression is variable/function.
Only sorting of field controls available. At least in NAV2016.
0 -
I also faced this Sorting on Variables but eventually NAV doesn't allow to do for Variables until its a part of Table.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Is the calculation something you could do as a flowfield? That way you could have dynamic sorting.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