Dynamically Sort A Flow Field Value

satraja2004
Member Posts: 45
Hi All,
I have a flow field called Total which totals the marks got by a particular student, suppose if i want to prepare ranks for the class, i want to find which student has got the maximum total if he has passed in all the subjects.
I want to dynamically sort the total field and give the rank in the order of maximum to minimum, but i don't want to change the postion of these entries in the table.
Roll no is the primary key for that table, the order of the primary key should not be changed.
can anyone give any idea for that. :-k
Thanks in Advance =D>
I have a flow field called Total which totals the marks got by a particular student, suppose if i want to prepare ranks for the class, i want to find which student has got the maximum total if he has passed in all the subjects.
I want to dynamically sort the total field and give the rank in the order of maximum to minimum, but i don't want to change the postion of these entries in the table.
Roll no is the primary key for that table, the order of the primary key should not be changed.
can anyone give any idea for that. :-k
Thanks in Advance =D>
Thanks & Regards
Raja.B
Raja.B
0
Comments
-
Displaying the table rows in a different order will not change their order in the database. I dont think a flowfield can be part of a key though, so you will have to work with a temp table.
Look at report 111, customer top 10. In the C/AL u will see the flow fields being calculated and used to populate the customer amount table and sort on those values.
[edit]
Like Mberger said u cannot have a key based on a flowfield so what you do is you make a key (in a temporary table or another field in ur table, personally id go with the temp table) that includes a field that is empty.
Then you calculate our flowfield values, and copy those into the field that u based the key on, now u can sort on that field. I hope htis makes my initial comment more understandable0 -
Hi Funkygraz,
I don't have the flow field as the part of the key,
I had a look over what you have said, but is there any other way to sort by not using an temp table.Thanks & Regards
Raja.B0 -
No, there is no way you can sort on a flowfield, as it can't be a part of a key. you'll have to use a temptable, or maybe a field in the same table that you temporarily fill with the value of the flowfield when you need it.0
-
Hi MBerger,
Thanks for ur immediate response,
surely i will work on that.Thanks & Regards
Raja.B0 -
Hi satraja2004,
I think this will lock your Table until your result comes...
Hi,
So what can i do? ](*,)
can't we acheive it through coding?Thanks & Regards
Raja.B0 -
satraja2004 wrote:Hi satraja2004,
Hi,
So what can i do? ](*,)
can't we acheive it through coding?
Hi satraja2004,
Plz get the idea from the Report ID 311 OR ID 111Now or Never0 -
calc the values of the flowfield, based on your filter, store the values in a temptable .> show the temptable in your needed sort order
or, if you are under sql, you create a view and a linked table to the view and output the filtered linked table (view). Search here also the forum for "linked object"
RegardsDo you make it right, it works too!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