This commit is contained in:
@@ -112,21 +112,28 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
|
|
||||||
DataListField AyaField = new DataListField();
|
DataListField AyaField = new DataListField();
|
||||||
var cust = dr.GetString(qSelect.map[f.GetSqlValueColumnName()]);
|
//could be null
|
||||||
if (!string.IsNullOrWhiteSpace(cust))
|
var rawValue = dr.GetValue(qSelect.map[f.GetSqlValueColumnName()]);
|
||||||
|
if (rawValue != null)
|
||||||
{
|
{
|
||||||
JObject j = JObject.Parse(cust);
|
string cust = rawValue.ToString();
|
||||||
//convert field name to cust name then get value
|
if (!string.IsNullOrWhiteSpace(cust))
|
||||||
var InternalCustomFieldName = FormFieldReference.TranslateLTCustomFieldToInternalCustomFieldName(TemplateField);
|
{
|
||||||
//Sometimes a custom field is specified but doesn't exist in the collection so don't assume it's there
|
JObject j = JObject.Parse(cust);
|
||||||
// AyaField.v = j[InternalCustomFieldName].Value<object>();
|
//convert field name to cust name then get value
|
||||||
JToken o = j[InternalCustomFieldName];
|
var InternalCustomFieldName = FormFieldReference.TranslateLTCustomFieldToInternalCustomFieldName(TemplateField);
|
||||||
if (o != null)
|
//Sometimes a custom field is specified but doesn't exist in the collection so don't assume it's there
|
||||||
AyaField.v = o.Value<object>();
|
// AyaField.v = j[InternalCustomFieldName].Value<object>();
|
||||||
else
|
JToken o = j[InternalCustomFieldName];
|
||||||
AyaField.v = null;
|
if (o != null)
|
||||||
|
AyaField.v = o.Value<object>();
|
||||||
|
else
|
||||||
|
AyaField.v = null;
|
||||||
|
|
||||||
row.Add(AyaField);
|
row.Add(AyaField);
|
||||||
|
}else{
|
||||||
|
AyaField.v=null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user