Here is the error message:

 

The expression is invalid

Error: Argument types for function 'If' are mismatched. Click here to move the 
cursor to the error (1)#1

Error: Result types are mismatched: the validation operation expected 'Text' 
but the expression returned 'Unknown'

 

 

It's the same whether I use  If (  LENGTH(BYGGINV_2) > 0,  BYGGINV_2 , 0)  or 
If (  LENGTH(BYGGINV_2) > 0,  BYGGINV_2 , ' ' )  

 

I get the feeling that the problem is LENGTH(BYGGINV_2) > 0 but I cant 
understand how ?

 

Från: JamesDudden [via OSGeo.org] 
[mailto:ml-node+3986117-1900696...@n2.nabble.com] 
Skickat: den 11 november 2009 13:31
Till: Kratz Fredrik - SBF
Ämne: Re: [mapguide-users] Need help with IF-statment in Tool Tip

 

What does the error say? It normally points to which bit is wrong. 

Is it the empty string? 
Try putting a 0 instead like this: 
If (  LENGTH(BYGGINV_2) > 0,  BYGGINV_2 , 0)   

Kratz wrote:

Hi! 

I need help writing a correct string with an if-statement. 

Trying to determine whether an attribute contains any value(string) or not. 

Why doesn't this string work? 

If (  LENGTH(BYGGINV_2) > 0,  BYGGINV_2 , ' ' )   


Default: 
If ( [condition], [trueValue], [falseValue] )   

Software Matters <http://www.software-matters.co.uk>  - Bespoke Database 
<http://www.software-matters.co.uk/bespoke-database-design.html>  and Software 
Solutions

 

________________________________

View message @ 
http://n2.nabble.com/Need-help-with-IF-statment-in-Tool-Tip-tp3985605p3986117.html
 
To unsubscribe from Need help with IF-statment in Tool Tip, click here < (link 
removed) > . 

 


-- 
View this message in context: 
http://n2.nabble.com/Need-help-with-IF-statment-in-Tool-Tip-tp3985605p3986496.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to