From 1aaf7e887999741b3e591f7309ca1df8a36e1f50 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 16 Jan 2019 22:45:42 +0000 Subject: [PATCH] --- server/AyaNova/biz/FormAvailableFields.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/AyaNova/biz/FormAvailableFields.cs b/server/AyaNova/biz/FormAvailableFields.cs index ba346e5d..0ae8f06c 100644 --- a/server/AyaNova/biz/FormAvailableFields.cs +++ b/server/AyaNova/biz/FormAvailableFields.cs @@ -100,7 +100,12 @@ namespace AyaNova.Biz public static string TranslateLTCustomFieldToInternalCustomFieldName(string lTCustomFieldName) { - var i = int.Parse(lTCustomFieldName); + var i = System.Convert.ToInt32(System.Text.RegularExpressions.Regex.Replace( + lTCustomFieldName, // Our input + "[^0-9]", // Select everything that is not in the range of 0-9 + "" // Replace that with an empty string. + )); + return $"c{i}"; }