Multiple Sorting On Form
happydays
Member Posts: 7
Even though I have been using this site for years this is my first post so please be gently with me.
I am trying to find out if there is a way of sorting a form view by two fields. The first field in descending order and the second field by accending order. Is this possible.
The form that I am trying to sort is the Rlshp. Mgt. Comment Line table. My Key is Date, Comment. Therefore I want to show the newest entry first (Date - descending) but then show the comment in acending order.
If I use standard decending within the key I get
01/08/08 Line 4
01/08/08 Line 3
01/08/08 Line 2
01/08/08 Line 1
but would like to get
01/08/08 Line 1
01/08/08 Line 2
01/08/08 Line 3
01/08/08 Line 4
any guidance on this would be gratefully received.
](*,)
I am trying to find out if there is a way of sorting a form view by two fields. The first field in descending order and the second field by accending order. Is this possible.
The form that I am trying to sort is the Rlshp. Mgt. Comment Line table. My Key is Date, Comment. Therefore I want to show the newest entry first (Date - descending) but then show the comment in acending order.
If I use standard decending within the key I get
01/08/08 Line 4
01/08/08 Line 3
01/08/08 Line 2
01/08/08 Line 1
but would like to get
01/08/08 Line 1
01/08/08 Line 2
01/08/08 Line 3
01/08/08 Line 4
any guidance on this would be gratefully received.
](*,)
Some things are just there to keep you mentally active.
0
Comments
-
You could copy the Data to a TempTable, but multiply the line No. by (-1) and then show your form based on this tempTable.0
-
you can go around the ascending&descending order problem by adding new field which will keep negative value of the line number. Than you can sort it ascending in both fields and you are done....
Date Line No. Line No. (Neg)
01/08/08 4 -4
01/08/08 3 -3
01/08/08 2 -2
01/08/08 1 -1
Sorting order: Date,Line No.(Neg)0 -
kine wrote:you can go around the ascending&descending order problem by adding new field which will keep negative value of the line number. Than you can sort it ascending in both fields and you are done....
Date Line No. Line No. (Neg)
01/08/08 4 -4
01/08/08 3 -3
01/08/08 2 -2
01/08/08 1 -1
Sorting order: Date,Line No.(Neg)
At what point would you update the negative line value.
Would this be on the insert of the new line.Some things are just there to keep you mentally active.0 -
Yes, for example... (if the line no. is filled though AutoSplitKey functionality).0
-
kine wrote:Yes, for example... (if the line no. is filled though AutoSplitKey functionality).
I have place this on the modify and insert values within the Table. It seems to work so I would like to thank you for your help.
Please can you let me know if what I have done does not make sense.
\:D/
=D>Some things are just there to keep you mentally active.0 -
kine wrote:Yes, for example... (if the line no. is filled though AutoSplitKey functionality).
Hi Kine
Sorry about this but when I try to create a new line it says that the line no already exists and if I try to place a new line underneath the las number it tells me that the autosplit key message.
Can anyone help.Some things are just there to keep you mentally active.0 -
of course, if you sort the table by another key than primary key, the autosplitkey functionality is not working correctly... but it has no meaning to insert lines when sorting in different order than line no.
Please, if you have problem with inserting the line through code, post the code. But now it seems for me like combination of more things. Keep it simple. Have you solved the problem of sorting the form? You can sort it, but in this case, you cannot enter into it new lines...0 -
kine wrote:of course, if you sort the table by another key than primary key, the autosplitkey functionality is not working correctly... but it has no meaning to insert lines when sorting in different order than line no.
Please, if you have problem with inserting the line through code, post the code. But now it seems for me like combination of more things. Keep it simple. Have you solved the problem of sorting the form? You can sort it, but in this case, you cannot enter into it new lines...
Hi Kine
Many thanks to your response. I have sorted out the issue with sorting the form and as long as they reset the sorting they can now add lines. This task is more difficult as I am also using the Waldo Notepad to insert into the comment lines as well. So I think it is best not to make it any more changes.
Many thanks for your help hopefully I will be able to return the help I have received now I have become a member.
Regards
Some things are just there to keep you mentally active.0
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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 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
