Ask A Cartographer

transitioning from VBScript to JScript

January 18 2011 | 0 comments
Categories: Data Modeling

Hello,
I want to update all the VBScript labeling expressions to JScript and I've found a few resources to help with very basic expressions but can find nothing to translate this VBScript
Left([Name], InStr([Name]," "))
to JScript.
Also, do you know of a site that would list the common commands? I'd like to find a quick reference sheet.
Thank you.

Mapping Center Answer:

Any generic JavaScript reference should help with the basic string manipulation, for example: http://www.w3schools.com/jsref/jsref_obj_string.asp

Here's a translation for the provided expression: [Name].substring(0, [Name].indexOf(" "))

Left([Name], InStr([Name]," "))

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |