<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Yu Gothic";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:12851717;
        mso-list-type:hybrid;
        mso-list-template-ids:251557884 67698703 1600926658 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ascii-font-family:Calibri;
        mso-fareast-font-family:"Yu Gothic";
        mso-hansi-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:545795822;
        mso-list-type:hybrid;
        mso-list-template-ids:1361487706 -714337656 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ascii-font-family:Calibri;
        mso-fareast-font-family:"Yu Gothic";
        mso-hansi-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Friends,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have encountered an expression evaluation error that would seem pretty self-explanatory on the surface:<o:p></o:p></p>
<p class="MsoNormal"><img width="602" height="381" style="width:6.2708in;height:3.9687in" id="Picture_x0020_3" src="cid:image004.png@01D35D3E.2C04E470"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After a couple passes to do the logical thing and reduce the line count and character count in the expression (trimming whitespace, removing annotations), I realized a mistake where I used #L instead of #LR for a reference to C-ACTIVITY-DESC. 
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Trimmed Example – the highlighted characters should read <span style="background:yellow;mso-highlight:yellow">
#LR</span>:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:Consolas">  switch(#SV(#PS()))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 1 :  38800.32*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/10260.77 $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 2 :  27584.18*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/7294.65  $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 3 :  33622.74*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/8891.55  $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 4 :  12621.09*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/3337.66  $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 5 :  8551.12*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/2901.15   $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 7 :  18717.66*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/6350.37  $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 8 :  8066.63*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/2899.83   $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">      case 10 : 24826.83*<span style="background:lime;mso-highlight:lime">#L</span>("SPACE","AREA")/8924.85  $Exh*Area/Total Unit Area<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:Consolas">default : no_def<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">  endswitch<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Fixing that function, unintuitively, caused the above “expression too long” error to go away!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This however raises a couple questions – I’d be sincerely interested to see any replies or thoughts around either prompt:<o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">I didn’t think there was a limit for expression length (or at least a practical limit).  The existence of this error suggests otherwise.   To avoid crossing that line and to better
 interpret these errors in the future:  Does anyone know what the actual character/line/other limits are for expression length? 
<o:p></o:p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level2 lfo2">For reference, after trimming this was a relatively hefty expression clocking in at 2737 characters and 73 lines, according to my text editor… so if there is a limit it would be above
 those figures since it’s now working again.  <o:p></o:p></li></ol>
</li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo2">To further help interpret/troubleshoot similar situations in the future… Why would using #L (which I would think should resolve in an error along the lines “you’re using the wrong
 function here, dummy”) trigger an <u>expression length</u> error?  Is there a hierarchy of error messages that maps out “throw error X before checking for root cause Y,” that we could construct and keep as a reference for interpreting what different expression
 evaluation errors could mean when they come up?<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks everyone!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">~Nick<o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#3A7A46"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#3A7A46"><img width="726" height="9" style="width:7.5625in;height:.0937in" id="Picture_x0020_1" src="cid:image002.png@01D35D3B.BED9BA30"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:"Arial",sans-serif;color:#3A7A46">Nick Caton, P.E., BEMP</span></b><span style="color:#3A7A46"><o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="724" style="width:543.0pt;border-collapse:collapse">
<tbody>
<tr>
<td width="230" valign="top" style="width:172.3pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">  Senior Energy Engineer</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">  Regional Energy Engineering Manager<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">  Energy and Sustainability Services</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">  Schneider Electric</span><span style="color:#1F497D"><o:p></o:p></span></p>
</td>
<td width="291" valign="top" style="width:218.3pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#57B069">D  </span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">913.564.6361
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#57B069">M  </span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">785.410.3317
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#57B069">F  </span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">913.564.6380</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1F497D"><br>
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#57B069">E  </span><span style="color:#1F497D"><a href="mailto:nicholas.caton@schneider-electric.com"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">nicholas.caton@schneider-electric.com</span></a><o:p></o:p></span></p>
</td>
<td width="203" valign="top" style="width:152.4pt;padding:0in 0in 0in 0in">
<p class="MsoNormal" align="right" style="text-align:right"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#626469">15200 Santa Fe Trail Drive<br>
Suite 204<br>
Lenexa, KS 66219<br>
United States</span><span style="color:#1F497D"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:4.0pt">
<td width="724" colspan="3" valign="top" style="width:543.0pt;padding:0in 0in 0in 0in;height:4.0pt">
<p class="MsoNormal" style="mso-line-height-alt:4.0pt"><span style="color:#3A7A46"><img border="0" width="722" height="49" style="width:7.5208in;height:.5104in" id="_x0000_i1025" src="cid:image003.png@01D35D3B.BED9BA30"><!--[if gte mso 9]><xml>
<o:OLEObject Type="Embed" ProgID="PBrush" ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1572166019">
</o:OLEObject>
</xml><![endif]--><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>