Added testcase files for Sort, SortByColumns functions (#430)

* Added testcase files for Sort, SortByColumns functions

* Updating the files based on review comments

* More review comment changes in Sort.txt file

* Updating sort test cases

Co-authored-by: Luc Genetier <69138830+LucGenetier@users.noreply.github.com>
Co-authored-by: Carlos Figueira <carlosff@microsoft.com>
This commit is contained in:
Mitu Goswami 2022-08-01 15:42:28 -07:00 коммит произвёл GitHub
Родитель 77d4a904b5
Коммит 915d0a216a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 1683 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,571 @@
// ******** NUMBER PARAMETERS ********
>> Sort([-2, -1, 5, 1, 2], Value)
[-2,-1,1,2,5]
>> Sort([-2, -1, 5, 1, 2], Value, SortOrder.Descending)
[5,2,1,-1,-2]
>> Sort([-2, -1, -1E+308, 1, 2], Value)
[-1e+308,-2,-1,1,2]
>> Sort([-2, -1, 1E+308, 1, 2], Value)
[-2,-1,1,2,1e+308]
>> Sort([{a:8, b:-1}, {a:2}, {b:5}], Value.a)
[{a:2},{a:8,b:-1},{b:5}]
>> Sort([{a:8, b:-1}, {a:2}, {b:5}], Value.b, SortOrder.Descending)
[{b:5},{a:8,b:-1},{a:2}]
// ******** STRING PARAMETERS ********
>> Sort(["a", "b", "D", "x", "J", "C"], Value)
["a","b","C","D","J","x"]
>> Sort(["a", "b", "D", "x", "J", "C"], Value, SortOrder.Descending)
["x","J","D","C","b","a"]
>> Sort(["a", "b", "B", "x", "D", "C"], Value)
["a","b","B","C","D","x"]
>> Sort(["Hello", "hellO", "hello", "heLLo", "HELLO", "hElLo"], Value)
["hello","hellO","heLLo","hElLo","Hello","HELLO"]
>> Sort(["Hello", "hellO", "1", "%", "2", "hElLo"], Value)
["%","1","2","hellO","hElLo","Hello"]
>> Sort(["a", "b", Blank(), "x", "J", "C"], Value)
["a","b","C","J","x",Blank()]
>> Sort(["a", "b", Blank(), "x", "J", "C"], Value, SortOrder.Descending)
["x","J","C","b","a",Blank()]
// ******** BOOLEAN PARAMETERS ********
>> Sort([true,false,true,false,true], Value)
[false,false,true,true,true]
>> Sort([true,false,true,false,true], Value, SortOrder.Descending)
[true,true,true,false,false]
>> Sort([true,false,Blank(),false,true], Value)
[false,false,true,true,Blank()]
>> Sort([true,false,Blank(),false,true], Value, SortOrder.Descending)
[true,true,false,false,Blank()]
// ******** DATE PARAMETERS ********
>> Sort([Date(2020, 01, 05), Date(2020, 01, 01), Date(1995, 01, 01)], Value)
[Date(1995,1,1),Date(2020,1,1),Date(2020,1,5)]
>> Sort([Date(2020, 01, 05), Date(2012,12,14), Date(2022,1,1)], Value)
[Date(2012,12,14),Date(2020,1,5),Date(2022,1,1)]
>> Sort([Date(2020, 01, 05), Date(2020, 01, 01), Date(1995, 01, 01)], Value, SortOrder.Descending)
[Date(2020,1,5),Date(2020,1,1),Date(1995,1,1)]
>> Sort([Date(2020, 01, 05), Date(2012,12,14), Blank(), Date(2022,1,1)], Value, SortOrder.Descending)
[Date(2022,1,1),Date(2020,1,5),Date(2012,12,14),Blank()]
// ******** TIME PARAMETERS ********
>> Sort([Time(12,35,55), Time(23, 01, 01), Time(5,30,50)], Value)
["05:30:50.000","12:35:55.000","23:01:01.000"]
>> Sort([Time(12,35,55), Time(23, 01, 01), Time(5,30,50)], Value, SortOrder.Descending)
["23:01:01.000","12:35:55.000","05:30:50.000"]
>> Sort([Time(17,29,0), Blank(), Time(5,30,50)], Value)
["05:30:50.000","17:29:00.000",Blank()]
// ******** DATETIME PARAMETERS ********
>> Sort([DateTime(2019,5,16,8,0,0), DateTime(2019,5,16,20,0,0), DateTime(2019,5,16,20,0,1)], Value)
[DateTime(2019,5,16,8,0,0,0),DateTime(2019,5,16,20,0,0,0),DateTime(2019,5,16,20,0,1,0)]
>> Sort([DateTime(2019,5,16,8,0,0), DateTime(2019,5,16,20,0,0), DateTime(2019,5,16,20,0,1)], Value, SortOrder.Descending)
[DateTime(2019,5,16,20,0,1,0),DateTime(2019,5,16,20,0,0,0),DateTime(2019,5,16,8,0,0,0)]
// ******** NULL and ERROR PARAMETERS ********
//Erroneous sort formula
>> Sort([-2, -1, 0, 1, 2], 1 / Value)
#Error(Kind=Div0)
>> Sort([-2, -1, 5, 1, 2], 1/0, SortOrder.Descending)
#Error(Kind=Div0)
//Error passed as one of the table records
>> Sort([-2, -1, 5, 1/0, 2], Value)
#Error(Kind=Div0)
>> Sort(["a", "b", "D", "x", "J", Error({Kind: 11})], Value)
#Error(Kind=Validation)
>> Sort([1/0], Blank())
Table({Value:#Error(Kind=13)})
// Sort error with bool value as sort formula
>> Sort([1/0],true)
Table({Value:#Error(Kind=13)})
>> Sort([Blank()],true)
[Blank()]
//Empty table and Blank sort formula parameter
>> Sort([], Blank())
Table()
//Empty table and Error sort formula parameter
>> Sort([], 1/0)
Table()
//Empty table and Numeric sort formula parameter
>> Sort([], 1)
Table()
//Empty table and String sort formula parameter
>> Sort([], "Hello")
Table()
//Blank passed as the table record
>> Sort([Blank()], Value)
[Blank()]
>> Sort([Blank(),Blank()], Value, SortOrder.Descending)
[Blank(),Blank()]
>> Sort([-2, Blank(), 5, 1, 2], Value)
[-2,1,2,5,Blank()]
>> Sort([-2, Blank(), 5, 1, 2], Value, SortOrder.Descending)
[5,2,1,-2,Blank()]
>> Sort([-2, -Blank(), 5, 1, 2], Value)
[-2,0,1,2,5]
//Blank sort formula parameter
>> Sort([Blank()], Blank())
[Blank()]
>> Sort([-2, -1, 5, 1, 2], Blank())
[-2,-1,5,1,2]
>> Sort([-2, -1, 5, 1, 2])
[-2,-1,5,1,2]
// ******** MULTI COLUMN SORT CASES ********
// SORT ON NUMERIC COLUMN "AGE" - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),Age)
Table({Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()})
// SORT ON NUMERIC COLUMN "AGE" - DESCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),Age, SortOrder.Descending)
Table({Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()})
// SORT ON BOOLEAN COLUMN "Vaccinated" - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), Vaccinated)
Table({Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()})
// SORT ON BOOLEAN COLUMN "Vaccinated" - DESCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), Vaccinated, SortOrder.Descending)
Table({Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()})
// SORT ON STRING COLUMN "First" - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),First)
Table({Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()})
// SORT ON STRING COLUMN "First" - DESCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), First, SortOrder.Descending)
Table({Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()})
// EMBEDDED SORT - FIRST ON STRING COLUMN "First" AND THEN ON "Last" - ASCENDING ORDER
>> Sort(Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),Last),First)
Table({Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:"Smith",Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:263,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:792,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Female",HasDog:Blank(),Last:"Rodriguez",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()})
// EMBEDDED SORT - FIRST ON STRING COLUMN "First" AND THEN ON "Last" - DESCENDING ORDER
>> Sort(Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),Last,SortOrder.Descending),First,SortOrder.Descending)
Table({Age:792,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:263,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:"Smith",Vaccinated:true},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Female",HasDog:Blank(),Last:"Rodriguez",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()})
// Blank() PASSED AS SORT FORMULA - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), Blank())
Table({Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true})
// Blank() PASSED AS SORT FORMULA - DESCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), Blank(),SortOrder.Descending)
Table({Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:Blank(),Vaccinated:true},{Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:Blank(),First:"Liam",Gender:"Male",HasDog:Blank(),Last:"Clark",Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Allen",Vaccinated:Blank()},{Age:Blank(),First:"Fiona",Gender:"Female",HasDog:Blank(),Last:"Brown",Vaccinated:Blank()},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:63,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:79,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:Blank(),First:Blank(),Gender:"Male",HasDog:Blank(),Last:"Walker",Vaccinated:Blank()},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:Blank(),First:"Ivor",Gender:"Female",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true})
// ERROR PASSED AS SORT FORMULA
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), 1/0)
#Error(Kind=Div0)
// SORT FORMULA - IF VACCINATED=TRUE, PASS ERROR AS THE SORT PARAMETER
>> Sort(Table(
{ First: "Bob", Last: Blank(), Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "Liam", Last: "Clark", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Allen", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Fiona", Last: "Brown", Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 63, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 79, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: Blank(), Last: "Walker", Age: Blank(), Gender: "Male", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
{ First: "Ivor", Last: Blank(), Age: Blank(), Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }), If(Vaccinated=true,1/0))
#Error(Kind=Div0)
// SORT A TABLE WITH ERROR ROWS - ASCENDING ORDER
//Sort by First Name
>> Sort(Table(
{ First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
If(Left("Hello", -1) = "", { First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true }),
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false }
),If(IsBlankOrError(ThisRecord), Blank(), First))
Table({First:"Alice",Last:"Smith",Age:5,Gender:"Female",Vaccinated:true,HasDog:true},{First:"Bob",Last:"Smith",Age:2,Gender:"Male",Vaccinated:true,HasDog:true},{First:"Dora",Last:"TheExplorer",Age:4,Gender:"Female",Vaccinated:false,HasDog:true},{First:"John",Last:"Batali",Age:17,Gender:"Male",Vaccinated:false,HasDog:false},#Error(Kind=25))
// SORT A TABLE WITH BLANK ROWS - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
Blank(),
Blank(),
Blank(),
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Blank(), Age: 263, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Blank(), Age: 792, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
Blank(),
{ First: "Andrew", Last: "Lee", Age: 27, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Nizam", Last: "Lewis", Age: 32, Gender: "Male", Vaccinated: true, HasDog: false },
{ First: "Amelia", Last: "Bedelia", Age: 40, Gender: "Female", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Dora", Last: "TheExplorer", Age: 4, Gender: "Female", Vaccinated: Blank(), HasDog: true },
{ First: "Maria", Last: "Martinez", Age: 20, Gender: "Female", Vaccinated: true, HasDog: false },
Blank(),
{ First: "Jaideep", Last: "Lopez", Age: 29, Gender: "Male", Vaccinated: true, HasDog: false }),If(IsBlank(Value),Blank(),Value.First))
Table({Age:5,First:"Alice",Gender:"Female",HasDog:true,Last:"Smith",Vaccinated:true},{Age:40,First:"Amelia",Gender:"Female",HasDog:Blank(),Last:"Bedelia",Vaccinated:Blank()},{Age:27,First:"Andrew",Gender:"Male",HasDog:false,Last:"Lee",Vaccinated:true},{Age:2,First:"Bob",Gender:"Male",HasDog:true,Last:"Smith",Vaccinated:true},{Age:4,First:"Dora",Gender:"Female",HasDog:true,Last:"TheExplorer",Vaccinated:Blank()},{Age:29,First:"Emily",Gender:"Female",HasDog:Blank(),Last:"Jones",Vaccinated:true},{Age:263,First:"Helio",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},{Age:29,First:"Jaideep",Gender:"Male",HasDog:false,Last:"Lopez",Vaccinated:true},{Age:17,First:"John",Gender:"Male",HasDog:false,Last:"Batali",Vaccinated:false},{Age:20,First:"Maria",Gender:"Female",HasDog:false,Last:"Martinez",Vaccinated:true},{Age:48,First:"Mary",Gender:"Female",HasDog:false,Last:"Harris",Vaccinated:false},{Age:32,First:"Nizam",Gender:"Male",HasDog:false,Last:"Lewis",Vaccinated:true},{Age:792,First:"Titan",Gender:"Unknown",HasDog:Blank(),Last:Blank(),Vaccinated:Blank()},Blank(),Blank(),Blank(),Blank(),Blank())
// SORT ON TABLE WITH ERROR VALUES FOR SOME COLUMNS - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Left("Hello", -1), Age: 263, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Left("Hello", -1), Age: 792, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() }),Last)
#Error(Kind=InvalidArgument)
// SORT ON TABLE WITH WITH ERROR VALUES FOR SOME COLUMNS, BUT DOESN'T TOUCH ERROR - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Left("Hello", -1), Age: 263, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Left("Hello", -1), Age: 792, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() }),First)
Table({First:"Alice",Last:"Smith",Age:5,Gender:"Female",Vaccinated:true,HasDog:true},{First:"Bob",Last:"Smith",Age:2,Gender:"Male",Vaccinated:true,HasDog:true},{First:"Emily",Last:"Jones",Age:29,Gender:"Female",Vaccinated:true,HasDog:false},{First:"Helio",Last:#Error(Kind=25),Age:263,Gender:"Unknown",Vaccinated:Blank(),HasDog:false},{First:"John",Last:"Batali",Age:17,Gender:"Male",Vaccinated:false,HasDog:false},{First:"Mary",Last:"Harris",Age:48,Gender:"Female",Vaccinated:false,HasDog:false},{First:"Titan",Last:#Error(Kind=25),Age:792,Gender:"Unknown",Vaccinated:Blank(),HasDog:false})
// SORT ON TABLE WITH ERROR VALUES FOR SOME COLUMNS, BUT THE ERROR IS HANDLED - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Last: "Smith", Age: 2, Gender: "Male", Vaccinated: true, HasDog: true },
{ First: "Alice", Last: "Smith", Age: 5, Gender: "Female", Vaccinated: true, HasDog: true },
{ First: "John", Last: "Batali", Age: 17, Gender: "Male", Vaccinated: false, HasDog: false },
{ First: "Emily", Last: "Jones", Age: 29, Gender: "Female", Vaccinated: true, HasDog: Blank() },
{ First: "Helio", Last: Left("Hello", -1), Age: 263, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() },
{ First: "Mary", Last: "Harris", Age: 48, Gender: "Female", Vaccinated: false, HasDog: false },
{ First: "Titan", Last: Left("Hello", -1), Age: 792, Gender: "Unknown", Vaccinated: Blank(), HasDog: Blank() }),If(IsBlankOrError(Last),"",Last))
Table({First:"Helio",Last:#Error(Kind=25),Age:263,Gender:"Unknown",Vaccinated:Blank(),HasDog:false},{First:"Titan",Last:#Error(Kind=25),Age:792,Gender:"Unknown",Vaccinated:Blank(),HasDog:false},{First:"John",Last:"Batali",Age:17,Gender:"Male",Vaccinated:false,HasDog:false},{First:"Mary",Last:"Harris",Age:48,Gender:"Female",Vaccinated:false,HasDog:false},{First:"Emily",Last:"Jones",Age:29,Gender:"Female",Vaccinated:true,HasDog:false},{First:"Bob",Last:"Smith",Age:2,Gender:"Male",Vaccinated:true,HasDog:true},{First:"Alice",Last:"Smith",Age:5,Gender:"Female",Vaccinated:true,HasDog:true})
// SORT HIERARCHICAL DATA ON BOOL EXPRESSION - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Age: 2, Properties: { Vaccinated: true, HasDog: true }},
{ First: "Alice", Age: 5, Properties: { Vaccinated: true, HasDog: true }},
{ First: "John", Age: 17, Properties: { Vaccinated: false, HasDog: false }},
{ First: "Emily", Age: 29, Properties: { Vaccinated: true, HasDog: Blank() }},
{ First: "Helio", Age: 63, Properties: { Vaccinated: Blank(), HasDog: Blank() }},
{ First: "Mary", Age: 48, Properties: Blank()},
{ First: "Titan", Age: 79, Properties: Blank() }),Coalesce(Properties.HasDog, false))
Table({Age:17,First:"John",Properties:{HasDog:false,Vaccinated:false}},{Age:2,First:"Bob",Properties:{HasDog:true,Vaccinated:true}},{Age:5,First:"Alice",Properties:{HasDog:true,Vaccinated:true}},{Age:29,First:"Emily",Properties:{HasDog:Blank(),Vaccinated:true}},{Age:63,First:"Helio",Properties:{HasDog:Blank(),Vaccinated:Blank()}},{Age:48,First:"Mary",Properties:Blank()},{Age:79,First:"Titan",Properties:Blank()})
// SORT HIERARCHICAL DATA ON BOOL EXPRESSION - DESCENDING ORDER
>> Sort(Table(
{ First: "Bob", Age: 2, Properties: { Vaccinated: true, HasDog: true }},
{ First: "Alice", Age: 5, Properties: { Vaccinated: true, HasDog: true }},
{ First: "John", Age: 17, Properties: { Vaccinated: false, HasDog: false }},
{ First: "Emily", Age: 29, Properties: { Vaccinated: true, HasDog: Blank() }},
{ First: "Helio", Age: 63, Properties: { Vaccinated: Blank(), HasDog: Blank() }},
{ First: "Mary", Age: 48, Properties: Blank()},
{ First: "Titan", Age: 79, Properties: Blank() }),Properties.HasDog, SortOrder.Descending)
Table({Age:2,First:"Bob",Properties:{HasDog:true,Vaccinated:true}},{Age:5,First:"Alice",Properties:{HasDog:true,Vaccinated:true}},{Age:17,First:"John",Properties:{HasDog:false,Vaccinated:false}},{Age:29,First:"Emily",Properties:{HasDog:Blank(),Vaccinated:true}},{Age:63,First:"Helio",Properties:{HasDog:Blank(),Vaccinated:Blank()}},{Age:48,First:"Mary",Properties:Blank()},{Age:79,First:"Titan",Properties:Blank()})
// SORT HIERARCHICAL DATA ON STRING EXPRESSION - ASCENDING ORDER
>> Sort(Table(
{ First: "Bob", Age: 2, Properties: { Last: "Smith", Vaccinated: true, HasDog: true }},
{ First: "Alice", Age: 5, Properties: { Last: "Miller", Vaccinated: true, HasDog: true }},
{ First: "John", Age: 17, Properties: { Last:"Jones", Vaccinated: false, HasDog: false }},
{ First: "Emily", Age: 29, Properties: { Last:"Harris", Vaccinated: true, HasDog: Blank() }},
{ First: "Helio", Age: 63, Properties: { Last:"Miller", Vaccinated: Blank(), HasDog: Blank() }},
{ First: "Mary", Age: 48, Properties: Blank()},
{ First: "Titan", Age: 79, Properties: Blank() }),Properties.Last)
Table({Age:29,First:"Emily",Properties:{HasDog:Blank(),Last:"Harris",Vaccinated:true}},{Age:17,First:"John",Properties:{HasDog:false,Last:"Jones",Vaccinated:false}},{Age:5,First:"Alice",Properties:{HasDog:true,Last:"Miller",Vaccinated:true}},{Age:63,First:"Helio",Properties:{HasDog:Blank(),Last:"Miller",Vaccinated:Blank()}},{Age:2,First:"Bob",Properties:{HasDog:true,Last:"Smith",Vaccinated:true}},{Age:48,First:"Mary",Properties:Blank()},{Age:79,First:"Titan",Properties:Blank()})
// SORT HIERARCHICAL DATA ON STRING EXPRESSION - DESCENCDING ORDER
>> Sort(Table(
{ First: "Bob", Age: 2, Properties: { Last: "Smith", Vaccinated: true, HasDog: true }},
{ First: "Alice", Age: 5, Properties: { Last: "Miller", Vaccinated: true, HasDog: true }},
{ First: "John", Age: 17, Properties: { Last:"Jones", Vaccinated: false, HasDog: false }},
{ First: "Emily", Age: 29, Properties: { Last:"Harris", Vaccinated: true, HasDog: Blank() }},
{ First: "Helio", Age: 63, Properties: { Last:"Miller", Vaccinated: Blank(), HasDog: Blank() }},
{ First: "Mary", Age: 48, Properties: Blank()},
{ First: "Titan", Age: 79, Properties: Blank() }),Properties.Last, SortOrder.Descending)
Table({Age:2,First:"Bob",Properties:{HasDog:true,Last:"Smith",Vaccinated:true}},{Age:5,First:"Alice",Properties:{HasDog:true,Last:"Miller",Vaccinated:true}},{Age:63,First:"Helio",Properties:{HasDog:Blank(),Last:"Miller",Vaccinated:Blank()}},{Age:17,First:"John",Properties:{HasDog:false,Last:"Jones",Vaccinated:false}},{Age:29,First:"Emily",Properties:{HasDog:Blank(),Last:"Harris",Vaccinated:true}},{Age:48,First:"Mary",Properties:Blank()},{Age:79,First:"Titan",Properties:Blank()})

Разница между файлами не показана из-за своего большого размера Загрузить разницу