I have asked a related question in the LiveCycle DS forum relating to my issue here (so please excuse my cross posting):
My issue is some fields in the flat data only have two fields (with the web_Category_Level_1 and web_Category_Level_1) set, so I am not sure how to sort for two fields and/or three fields in the same flat data.
The data schema is:
CategoryName, web_Category_Level_1, web_Category_Level_2, web_Category_Level_3
groupingCollection = new GroupingCollection();
grouping = new Grouping();
fields = new Array();
fields.push(new GroupingField( "web_Category_Level_1", true ));
fields.push(new GroupingField( "web_Category_Level_2", true ));
fields.push(new GroupingField( "web_Category_Level_3", true ));//this field is not always present
grouping.fields = fields;
groupingCollection.grouping = grouping;
Had looked into compare groupingObjectFunction and groupingCompareFunction but did not have much luck...and not sure if I can even use those to dynamically sort for only the two fields.
It had been suggested to use LiveCycle 3.1 (see previous post) allowing me to query the local cache and not using ADG.
Any suggestions much appreciated.