This commit is contained in:
@@ -89,11 +89,11 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
List<AyaFieldData> row = new List<AyaFieldData>(returnRowColumnCount);
|
List<AyaFieldData> row = new List<AyaFieldData>(returnRowColumnCount);
|
||||||
|
|
||||||
|
|
||||||
//INSERT REMAINING FIELDS FROM TEMPLATE INTO THE RETURN ROWS LIST
|
//INSERT REMAINING FIELDS FROM TEMPLATE INTO THE RETURN ROWS LIST
|
||||||
foreach (string TemplateField in ListViewFieldList)
|
foreach (string TemplateField in ListViewFieldList)
|
||||||
{
|
{
|
||||||
|
|
||||||
//get the AyaObjectFieldDefinition
|
//get the AyaObjectFieldDefinition
|
||||||
AyaDataListFieldDefinition f = DataList.FieldDefinitions.FirstOrDefault(x => x.FieldKey == TemplateField);
|
AyaDataListFieldDefinition f = DataList.FieldDefinitions.FirstOrDefault(x => x.FieldKey == TemplateField);
|
||||||
if (f.IsCustomField)
|
if (f.IsCustomField)
|
||||||
@@ -106,7 +106,14 @@ namespace AyaNova.DataList
|
|||||||
JObject j = JObject.Parse(cust);
|
JObject j = JObject.Parse(cust);
|
||||||
//convert field name to cust name then get value
|
//convert field name to cust name then get value
|
||||||
var InternalCustomFieldName = AyaFormFieldDefinitions.TranslateLTCustomFieldToInternalCustomFieldName(TemplateField);
|
var InternalCustomFieldName = AyaFormFieldDefinitions.TranslateLTCustomFieldToInternalCustomFieldName(TemplateField);
|
||||||
AyaField.v = j[InternalCustomFieldName].Value<object>();
|
//Sometimes a custom field is specified but doesn't exist in the collection so don't assume it's there
|
||||||
|
// AyaField.v = j[InternalCustomFieldName].Value<object>();
|
||||||
|
JToken o = j[InternalCustomFieldName];
|
||||||
|
if (o != null)
|
||||||
|
AyaField.v = o.Value<object>();
|
||||||
|
else
|
||||||
|
AyaField.v = null;
|
||||||
|
|
||||||
row.Add(AyaField);
|
row.Add(AyaField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user