This commit is contained in:
@@ -149,11 +149,16 @@ namespace AyaNova.Biz
|
||||
|
||||
// ColumnsJSON=@"""columns"":[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "},{..etc..}]";
|
||||
sb.Append("\"columns\":[");
|
||||
var isFirstColumn = true;
|
||||
foreach (string s in fullFields)
|
||||
{
|
||||
ObjectField o = fields.FirstOrDefault(x => x.Key == s);
|
||||
if (o != null)
|
||||
{//Here is where we can vet the field name, if it doesn't exist though, for now we'll just ignore it
|
||||
if (!isFirstColumn)
|
||||
{
|
||||
sb.Append(",");
|
||||
}
|
||||
sb.Append("{");
|
||||
//Build required part of column definition
|
||||
sb.Append($"\"cm\":\"{o.Key}\",\"dt\":\"{o.DataType}\"");
|
||||
@@ -163,6 +168,7 @@ namespace AyaNova.Biz
|
||||
sb.Append($",\"ay\":{o.AyObjectType}");
|
||||
|
||||
sb.Append("}");
|
||||
isFirstColumn = false;
|
||||
}
|
||||
}
|
||||
sb.Append("]");
|
||||
|
||||
Reference in New Issue
Block a user