Maestro Expression Editor Syntax

3 messages Options
Embed this post
Permalink
Tysonk

Maestro Expression Editor Syntax

Reply Threaded More More options
Print post
Permalink
Hello,

I'm trying to compare String expressions in Maestro's Expression Editor to style a layer in a certain way. I have a attribute "Postedname" for the streets in my map. Now I want to style the streets with a certain name, in a different way. For, example I want all the streets with the name "Third Street" to be in a thicker line than the rest.

My problem is that I'm not sure of the exact syntax to do this. I've tried things such as:

Postedname="Third Street"
Postedname Equals "Third Street"
Postedname.equals("Third Street")=1
Postedname.compareto("Third Street")=1

....But to no avail. I was wondering if someone could help me out with explaining the correct way to compare/evaluate two Strings in Maestro's Expression Editor.

Thanks!
Traian Stanev

RE: Maestro Expression Editor Syntax

Reply Threaded More More options
Print post
Permalink
Try:

Postedname='Third Street'


Single quotes for strings. Double quotes makes it think that it is a column name.


Traian


> -----Original Message-----
> From: [hidden email] [mailto:mapguide-internals-
> [hidden email]] On Behalf Of Tysonk
> Sent: Tuesday, August 25, 2009 10:48 AM
> To: [hidden email]
> Subject: [mapguide-internals] Maestro Expression Editor Syntax
>
>
> Hello,
>
> I'm trying to compare String expressions in Maestro's Expression Editor to
> style a layer in a certain way. I have a attribute "Postedname" for the
> streets in my map. Now I want to style the streets with a certain name, in a
> different way. For, example I want all the streets with the name "Third
> Street" to be in a thicker line than the rest.
>
> My problem is that I'm not sure of the exact syntax to do this. I've tried
> things such as:
>
> Postedname="Third Street"
> Postedname Equals "Third Street"
> Postedname.equals("Third Street")=1
> Postedname.compareto("Third Street")=1
>
> ....But to no avail. I was wondering if someone could help me out with
> explaining the correct way to compare/evaluate two Strings in Maestro's
> Expression Editor.
>
> Thanks!
> --
> View this message in context: http://n2.nabble.com/Maestro-Expression-
> Editor-Syntax-tp3510365p3510365.html
> Sent from the MapGuide Internals mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Tysonk

RE: Maestro Expression Editor Syntax

Reply Threaded More More options
Print post
Permalink
Thanks Traian, that worked perfectly!


I was trying tirelessly to get this working yesterday, and I could have sworn I tried single quotes as well, but I guess not.

Thanks again!

Traian Stanev wrote:
Try:

Postedname='Third Street'


Single quotes for strings. Double quotes makes it think that it is a column name.


Traian


> -----Original Message-----
> From: mapguide-internals-bounces@lists.osgeo.org [mailto:mapguide-internals-
> bounces@lists.osgeo.org] On Behalf Of Tysonk
> Sent: Tuesday, August 25, 2009 10:48 AM
> To: mapguide-internals@lists.osgeo.org
> Subject: [mapguide-internals] Maestro Expression Editor Syntax
>
>
> Hello,
>
> I'm trying to compare String expressions in Maestro's Expression Editor to
> style a layer in a certain way. I have a attribute "Postedname" for the
> streets in my map. Now I want to style the streets with a certain name, in a
> different way. For, example I want all the streets with the name "Third
> Street" to be in a thicker line than the rest.
>
> My problem is that I'm not sure of the exact syntax to do this. I've tried
> things such as:
>
> Postedname="Third Street"
> Postedname Equals "Third Street"
> Postedname.equals("Third Street")=1
> Postedname.compareto("Third Street")=1
>
> ....But to no avail. I was wondering if someone could help me out with
> explaining the correct way to compare/evaluate two Strings in Maestro's
> Expression Editor.
>
> Thanks!
> --
> View this message in context: http://n2.nabble.com/Maestro-Expression-
> Editor-Syntax-tp3510365p3510365.html
> Sent from the MapGuide Internals mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals