Skip navigation
Currently Being Moderated

User Defined Sorting

Aug 17, 2011 11:56 AM

Hello,

 

I amd developing an app that uses 2 json datasets(A & B) each with its own separate data source. One of these datasets( B updated every 30 mins) is tied to a spry:region and has a {function::} that gets corresponding data from the other dataset(A updated every 30 secs)( if any as a record item may no have any information/ reference related to it at all). However, should data exists I would like the dataset(B ) records to be sorted based on related record data in the other dataset (A)( if there exists any for it). Can a user defined sort function be made to cater towards this and how?

 
Replies
  • Currently Being Moderated
    Aug 17, 2011 11:47 PM   in reply to icecappacino

    Please show us some code.

     

    And what do you mean by " I would like the dataset(B ) records to be sorted based on related record data in the other dataset (A)"? If A is Ascending, B should be Ascending, and vice versa?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 18, 2011 10:06 AM   in reply to icecappacino

    Pff... Don't know if it's me or last hours of the day, but I'm having a hard time to get it.

     

    {id: 2, order:4} is in third position in your ordered list, {id:4, order:3} is in 2nd position. I take it that what you call 'order' in dataset A is the **position** in which 'id' belonging to dataset B should be in your resulting HTML ordered list; correct?

     

    As for me, I still need more code such as your Spry regions too...

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points