From eb2ed910bcfd7a130a274470eb78c98ab43523e8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 2 Apr 2020 20:16:28 +0000 Subject: [PATCH] --- server/AyaNova/DataList/DataListFetcher.cs | 14 +++++++++++--- server/AyaNova/biz/AyaFieldData.cs | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/DataList/DataListFetcher.cs b/server/AyaNova/DataList/DataListFetcher.cs index 33a42ee8..62f11763 100644 --- a/server/AyaNova/DataList/DataListFetcher.cs +++ b/server/AyaNova/DataList/DataListFetcher.cs @@ -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(); + //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(); JToken o = j[InternalCustomFieldName]; if (o != null) AyaField.v = o.Value(); 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) { diff --git a/server/AyaNova/biz/AyaFieldData.cs b/server/AyaNova/biz/AyaFieldData.cs index 3438f935..76650f94 100644 --- a/server/AyaNova/biz/AyaFieldData.cs +++ b/server/AyaNova/biz/AyaFieldData.cs @@ -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; } } } \ No newline at end of file