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}"; }