This commit is contained in:
2020-02-27 19:14:46 +00:00
parent 30e0ef3949
commit 5b0ce90157

View File

@@ -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);
} }