Organizing data in a table

So I'm trying to work with data in a table and organize it numerically so I can display it in order. Basically I have a program that at the end of it will end up with data in a table with column 1 having text and then the following columns will have numbers. I was wondering if there was a way to sort the data by one of the numerical columns and then have it reorganize (possibly to a seperate table) keeping the rows grouped together with that sorted row?

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    Do you need to do this as a one off or do you need your game/app to do this each time it runs? If it's a one off you could export the table to csv, re-order it in Excel and then import it back in.
  • tonymc118tonymc118 Member Posts: 6
    Oh, no I need it to happen in the ap each time the user wants to view it.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I'm not going to say it's impossible but because you can't loop through tables in the current version of GameSalad (10.3) I'd imagine it would be quite difficult, especially if the table could be any size.

    I can't think of an efficient way of doing this and I'm not near a copy of GameSalad to give it a go. Someone else may have a suggestion.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited September 2013
    This could be done but it's a tall order to build the algorthom. You might be better off taking the approach of sorting the data during storage. And example of what a row of data you describe might be would be helpful in guiding you.
  • tonymc118tonymc118 Member Posts: 6
    Sure, I'm making an app for tracking football stats during a game. So as the game progresses things such as rushing yards will accumulate in each player's row and then I was hoping at the end of the game to be able to let the user sort the data by certain columns to make the stats easier to view.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yeah GS is not built for raw data stuff like that.
  • tonymc118tonymc118 Member Posts: 6
    Ok I kind of assumed that from what I'd seen but figured it didn't hurt to ask just incase. From what I've read there is some looping function that you can use in the nightly build for pro users if I understand correctly. Would that be of any use in this scenario?
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I thought of the loops but I can only see it being easily done with a loop inside a loop and at the moment you can't do that in the nightly. The fact that the loop behaviors say you can't would suggest it's not something that will be added soon.
Sign In or Register to comment.