MarcoB

Sorting Fields

Discussion created by MarcoB on May 29, 2017
Latest reply on Jun 2, 2017 by MarcoB

Hi.

 

I have a table with 5 fields, F1, F2, F3, F4, F5, ..., F15 formatted as Number that holds numbers from 1 to 40.

I input the numbers in an aleatory order.

I need to make a script for a button that when pressed reads the numbers, sort them and wright back to fields Fn in the sorted ascending way.

I tried to make a script comparing groups of 2 fields, making it write the lower number to the first field and the bigger number to the second field.

It end up like this: 22, 03, 11, 33, 2, 37, 35, 9, 7, 21, 14, 1, 6, 27, 40 -> 03, 22, 11, 33, 2, 37, 9, 35, 7, 21, 1, 14, 6, 27, 40

But from that, I could not establish a good idea to follow.

Please, how can I accomplish that?

Outcomes