Enclose the string in quotes, as in:
createExpression(newlayer,"County","\""+cntyfips+"\"",{"String",3,0})

Larry Manire

---------- Original Message -----------
From: "pdr_dan" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Fri, 27 Jul 2007 21:22:00 -0000
Subject: [Maptitude] CreateExpression()

> I'm trying to use the above function to create a new field in my
> current view.  I want to use a variable containing a string constant
> in the function.  The problem is that even though I use options to
> specify that it's a string, the expression outputs it as an integer. 
> Am I specifying the options field wrong?
> 
>       i = 1
>       cntyfips = format(i,"000")
>       createExpression(newlayer,"County",cntyfips,{"String",3,0})
> 
> when I try it using just a constant eg
>       createExpression(newlayer,"County","'001'",{"String",3,0})
> then it works, but I'm not sure how to do that with a variable. 
> Anyone have any ideas?
------- End of Original Message -------



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Maptitude/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/Maptitude/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to