Sorting on Var Value in List Page

DanielFDanielF Posts: 15Member
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.

myvdm9px40wh.png

linz0xl09k1d.png

Can I fix this?

Work around disabling sorting on whole List is possible - is this possible only for Variable Coloumn?


Kind Regards
Daniel

Comments

  • Slawek_GuzekSlawek_Guzek Posts: 713Member
    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
  • DanielFDanielF Posts: 15Member
    Hi Slawek_Guzek,

    thanks for your reply. Yes I was wrong - I changed to Var on Page.

    Kind Regards
Sign In or Register to comment.