This commit is contained in:
@@ -37,6 +37,7 @@ namespace AyaNova.DataList
|
||||
|
||||
sb.Append(" AS df");
|
||||
|
||||
bool CustomFieldIncluded = false;
|
||||
foreach (string ColumnName in listViewFieldList)
|
||||
{
|
||||
//skip the df column, it's already been processed above
|
||||
@@ -53,15 +54,25 @@ namespace AyaNova.DataList
|
||||
if (o != null)
|
||||
{//Ignore missing fields in production
|
||||
|
||||
sb.Append(", ");
|
||||
sb.Append(o.GetSqlValueColumnName());
|
||||
|
||||
if (o.IsCustomField && !CustomFieldIncluded)
|
||||
{ //if any are custom field then add custom fields column to query
|
||||
CustomFieldIncluded=true;
|
||||
|
||||
//does it also have an ID column?
|
||||
if (!string.IsNullOrWhiteSpace(o.SqlIdColumnName))
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(", ");
|
||||
sb.Append(o.SqlIdColumnName);
|
||||
sb.Append(o.GetSqlValueColumnName());
|
||||
|
||||
//does it also have an ID column?
|
||||
if (!string.IsNullOrWhiteSpace(o.SqlIdColumnName))
|
||||
{
|
||||
sb.Append(", ");
|
||||
sb.Append(o.SqlIdColumnName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user