This commit is contained in:
2020-04-02 20:16:28 +00:00
parent 33ef1ae4fa
commit eb2ed910bc
2 changed files with 13 additions and 3 deletions

View File

@@ -106,14 +106,14 @@ namespace AyaNova.DataList
JObject j = JObject.Parse(cust);
//convert field name to cust name then get value
var InternalCustomFieldName = AyaFormFieldDefinitions.TranslateLTCustomFieldToInternalCustomFieldName(TemplateField);
//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>();
//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);
}
@@ -141,6 +141,14 @@ dr.GetOrdinal("customfields");
AyaFieldData AyaField = new AyaFieldData();
AyaField.v = dr.GetValue(SelectBuild.map[f.GetSqlValueColumnName()]);
if (f.IsRowId)
{
AyaField.rid = true;
}
else
{
AyaField.rid = null;
}
if (f.SqlIdColumnName != null)
{

View File

@@ -11,5 +11,7 @@ namespace AyaNova.Biz
public object v { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
public long? i { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
public bool? rid { get; set; }
}
}