locked
Sorting by a parent field not working after data change. RRS feed

  • Question

  • Problem: I have a schedule list details screen with the list being employees sorted by RankSortOrder which is a helper field in the AgencyRanks entity. The purpose of this helper field was to be abile to sort employee lists by the rank of the employee.

    It is a look up table for my Employee table which stores the Rank.

    I created a global query  filtering by Active status and sorting by EmployeeRank.RankSortOrder in Asc:

    This worked fine until I "reassigned" an employee to a different position in my ManageEmployeesScreen such as changing my assignment (the value in the combo box) from "Charlie Zone" to "Echo Zone".. Now when I filter by "Echo Zone" "Day" I appear in the list but the sort order doesn't work only for the edited record, the rest are sorted properly.

    I thought the filters may be messing it up so I edited the screen query adding the same sort order.

    This did not correct it either. Any ideas on why it is not sorting edited fields? (I have refreshed, closed, restarted and even shut down VS thinking changes may not have been saved but the dilemma persist.

    Thanks for any help. 


    JL

    Tuesday, September 17, 2013 12:58 PM

All replies

  • The sort is doneon the server when the query is executed.  The sort is performed by the underlying data store which doesn't contain the unsaved values at the time the sort is performed.
    Tuesday, September 17, 2013 1:12 PM
  • This occurs even after the data is saved.

    JL

    Tuesday, September 17, 2013 4:14 PM
  • Just to be clear, have you done something to trigger the query to re-execute after the data is saved?  Eg have you refreshed the screen after saving?
    Tuesday, September 17, 2013 5:26 PM
  • I have refreshed, closed, restarted and even shut down VS thinking changes may not have been saved but the dilemma persist.

    JL

    Tuesday, September 17, 2013 5:31 PM