Dynamically Sort A Flow Field Value

satraja2004satraja2004 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>
Thanks & Regards

Raja.B

Comments

  • FunkygrazFunkygraz Member Posts: 12
    edited 2009-02-26
    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 understandable
  • satraja2004satraja2004 Member Posts: 45
    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.B
  • MBergerMBerger Member Posts: 413
    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.
  • satraja2004satraja2004 Member Posts: 45
    Hi MBerger,

    Thanks for ur immediate response,

    surely i will work on that.
    Thanks & Regards

    Raja.B
  • navuser1navuser1 Member Posts: 1,329
    MBerger wrote:
    ......or maybe a field in the same table that you temporarily fill with the value of the flowfield when you need it.

    Hi satraja2004,

    I think this will lock your Table until your result comes...
    Now or Never
  • satraja2004satraja2004 Member Posts: 45
    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.B
  • navuser1navuser1 Member Posts: 1,329
    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 111
    Now or Never
  • garakgarak Member Posts: 3,263
    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"

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.