<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (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]-->
<!--[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]-->
<div class=Section1>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:"Microsoft Sans Serif","sans-serif"'>Here is
the error message:<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'><o:p> </o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'>The expression is invalid<o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><b><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'>Error: </span></b><span lang=EN-US style='font-size:8.5pt;
font-family:"Microsoft Sans Serif","sans-serif"'>Argument types for function
'If' are mismatched. Click here to move the cursor to the error (1)<span style='display:none'>#1</span><o:p></o:p></span></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'>Error: Result types are mismatched: the validation operation
expected 'Text' but the expression returned 'Unknown'<o:p></o:p></span></b></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'><o:p> </o:p></span></b></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:8.5pt;font-family:"Microsoft Sans Serif","sans-serif";
color:red'><o:p> </o:p></span></b></p>
<p class=MsoNormal><span lang=EN-US style='font-size:14.0pt'>It’s the same whether
I use</span><b><span lang=EN-US style='font-size:14.0pt;font-family:"Microsoft Sans Serif","sans-serif"'>
</span></b><u><span lang=EN-US style='font-size:14.0pt;color:#0070C0'>If (
LENGTH(BYGGINV_2) > 0, BYGGINV_2 , 0)</span></u><span lang=EN-US style='font-size:14.0pt'> </span><span lang=EN-US>or </span><u><span lang=EN-US style='font-size:14.0pt;color:#0070C0'>If ( LENGTH(BYGGINV_2)
> 0, BYGGINV_2 , ' ' )</span></u><span lang=EN-US style='font-size:
14.0pt;color:#0070C0'> </span><span lang=EN-US style='color:#0070C0'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#0070C0'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I get the feeling that the problem is LENGTH(BYGGINV_2)
> 0 but I cant understand how ?</span><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Från:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> JamesDudden [via
OSGeo.org] [mailto:<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3986496&i=0" target="_top" rel="nofollow">[hidden email]</a>] <br>
<b>Skickat:</b> den 11 november 2009 13:31<br>
<b>Till:</b> Kratz Fredrik - SBF<br>
<b>Ämne:</b> Re: [mapguide-users] Need help with IF-statment in Tool Tip<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>What does the error say? It
normally points to which bit is wrong. <br>
<br>
Is it the empty string? <br>
Try putting a 0 instead like this: <br>
If ( LENGTH(BYGGINV_2) > 0, BYGGINV_2 , 0) <o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><b>Kratz wrote:<o:p></o:p></b></p>
</div>
<div>
<p class=MsoNormal>Hi! <br>
<br>
I need help writing a correct string with an if-statement. <br>
<br>
Trying to determine whether an attribute contains any value(string) or not. <br>
<br>
Why doesn't this string work? <br>
<br>
If ( LENGTH(BYGGINV_2) > 0, BYGGINV_2 , ' ' ) <br>
<br>
<br>
Default: <br>
If ( [condition], [trueValue], [falseValue] ) <o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><a href="http://www.software-matters.co.uk" target="_top" rel="nofollow">Software
Matters</a> - <a href="http://www.software-matters.co.uk/bespoke-database-design.html" target="_top" rel="nofollow">Bespoke Database</a> and Software Solutions<o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=1 width="100%" noshade style='color:#CCCCCC' align=center>
</div>
<div>
<p class=MsoNormal><span style='font-size:8.5pt;font-family:"Tahoma","sans-serif";
color:#666666'>View message @ <a href="http://n2.nabble.com/Need-help-with-IF-statment-in-Tool-Tip-tp3985605p3986117.html" target="_top" rel="nofollow">http://n2.nabble.com/Need-help-with-IF-statment-in-Tool-Tip-tp3985605p3986117.html</a>
<br>
To unsubscribe from Need help with IF-statment in Tool Tip, <a target="_top" rel="nofollow">click
here</a>. <o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Need-help-with-IF-statment-in-Tool-Tip-tp3985605p3986496.html">SV: [mapguide-users] Need help with IF-statment in Tool Tip</a><br>
Sent from the <a href="http://n2.nabble.com/MapGuide-Users-f1803227.html">MapGuide Users mailing list archive</a> at Nabble.com.<br>