Mapguide 2.5.2 fdo expression IF with a string field

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapguide 2.5.2 fdo expression IF with a string field

Rémy Gourrat

Hi,

 

If i use the FDO expression with a number field like this => IF(‘FIELD1 = 1’,’Yes!’,’No’) it’s Ok

 

But I don’t know how to escape the quote character when I want to use it with a string field, I tried it without success :

 

IF(‘FIELD1 = \’A\’’,’Yes!’,’No’)

 

IF(‘FIELD1 = ‘’1’’’,’Yes!’,’No’) double single quote

 

IF(‘FIELD1 = “1”’,’Yes!’,’No’) one double quote

 

Thanks for your help

 

Rémy

 

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5.2 fdo expression IF with a string field

Jackie Ng
You could try using LOOKUP() as a workaround. This should be equivalent to what you're trying to achieve.

LOOKUP(FIELD1, 'No', 'A', 'Yes')
LOOKUP(FIELD1, '1', 'A', 'Yes')

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5.2 fdo expression IF with a string field

Rémy Gourrat
Thanks

It's the right way.

Rémy
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
AG-Carto - Bayonne