That worked a charm.
Thank you very much.
Now too complicate things.
Is there a way.
a = [12,5,9,10,10,3];
a.sort(function(a, b){return a – b});
a.toSource();
Like above, say you have 2 of the same number in an array. It’s not so much of an issue for this example, but what I want to finally do. If two numbers are the same, it will look at a secondary number to determine which 10 in this case goes in order of the other.
Is it possible to if([]&&[] ==true) look at another part to determine which goes above the other.
All I can think is. Split
A = 10-9
B = 10-5
If[A.split(“-“)[0] == B .split(“-“)[0]) {
C = [A.split(“-“)[1],B.split(“-“)[1]]
C.sort(function(a, b){return a – b});
} else {
C = [A.split(“-“)[0],B.split(“-“)[0]]
C.sort(function(a, b){return a – b});
}
I know this probably isn’t right without testing, but it looks right in my head…But too do this with 24 numbers would break my head.
If there is no easy way…I’m just going to leave it and say I can’t build this. Spend some money get an API from Press association rather than trying to do this cheap and expecting someone to fill 144 boxes of Data.
At least to fill Wins, Draws and Goal Difference, at least reduces this, but the poor sod has to do this weekly for 2 sports and 6 leagues in each of them. So I’m hoping I can build something that will alter text.sourceText from above expression. POINTS-GD-W-D-L-TEAM Then whatever the order the array sorts…It puts the rest of the data into the other fields.
The theory works, it’s just now if Points are the same it looks at GD instead.
I’ll have one comp that they type the data in and comp two is the MASTER.
I know I’d be best writing a script, but it’s time more than anything.