This commit is contained in:
@@ -34,13 +34,12 @@ namespace AyaNova.DataList
|
||||
var ListViewArray = JArray.Parse(listOptions.ListView);
|
||||
|
||||
|
||||
|
||||
|
||||
List<string> templateFieldList = DataList.GetFieldListFromListView(ListViewArray);
|
||||
//Get the field key names in a list from the listview
|
||||
List<string> ListViewFieldList = DataList.GetFieldListFromListView(ListViewArray);
|
||||
|
||||
//BUILD THE QUERY
|
||||
//SELECT FRAGMENT COLUMNS FROM TEMPLATE
|
||||
var qSelectColumns = DataListSqlSelectBuilder.Build(DataList.FieldDefinitions, ListViewArray);
|
||||
var qSelectColumns = DataListSqlSelectBuilder.Build(DataList.FieldDefinitions, ListViewFieldList);
|
||||
|
||||
//FROM CLAUSE
|
||||
var qFrom = DataList.SQLFrom;
|
||||
@@ -68,7 +67,7 @@ namespace AyaNova.DataList
|
||||
qTotalRecordsQuery = $"SELECT COUNT(*) {qFrom} {qWhere}".Replace(" ", " ");
|
||||
|
||||
//RETURN OBJECTS
|
||||
int returnRowColumnCount = templateFieldList.Count() + 1;//Templates don't have the DF column in them but we need it and it's in the query so plus one
|
||||
int returnRowColumnCount = ListViewFieldList.Count() + 1;//Templates don't have the DF column in them but we need it and it's in the query so plus one
|
||||
List<List<AyaFieldData>> rows = new List<List<AyaFieldData>>();
|
||||
long totalRecordCount = 0;
|
||||
|
||||
@@ -102,7 +101,7 @@ namespace AyaNova.DataList
|
||||
int nCurrentColumnPointer = 1;//start at 1
|
||||
|
||||
//INSERT REMAINING FIELDS FROM TEMPLATE INTO THE RETURN ROWS LIST
|
||||
foreach (string TemplateField in templateFieldList)
|
||||
foreach (string TemplateField in ListViewFieldList)
|
||||
{
|
||||
//get the AyaObjectFieldDefinition
|
||||
AyaDataListFieldDefinition f = DataList.FieldDefinitions.FirstOrDefault(x => x.FieldKey == TemplateField);
|
||||
|
||||
Reference in New Issue
Block a user