From c903806f2003e7f6168fddd86e1cb010c635c63e Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 7 Mar 2019 18:21:05 +0000 Subject: [PATCH] B2019-031 - Alarm Procedures that use ROLookup to retrieve RO Return Values from an Alarm RO database. If the Alarm ID contains a comma, it was being truncated at the first comma. --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 093f1e83..0a596c4b 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1359,7 +1359,18 @@ i = 0; string tnk = m.Value; ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref parms, tnk); } - string[] parts = parms.Split(",".ToCharArray()); + string[] parts = parms.Split(",".ToCharArray());// split on comma + // B2019-031 Support commas embedded in Alarm ID (Procedure Number) + if (parts.Length > 3)// If extra commas combine first part to account for it + { + int n = parts.Length - 3; + string part0 = parts[0]; + for (int i = 0; i < n; i++) // append parts based upon the number of parts (commas) + part0 += "," + parts[i+1]; + parts[0] = part0; + parts[1] = parts[n + 1];// Get the last 2 parts + parts[2] = parts[n + 2]; + } // parts[0] - the RO to look up - for Alarms, is usually the EOP number thus uses the "{EOPNUM}" token // parts[1] - Which of the multiple return value from the RO to return // parts[2] - the value to use if not found in ROs - usually defined in a PSI field for that Alarm procedure