Issue Zooming to URL Parameter

829
2
Jump to solution
08-08-2014 06:04 AM
JustinZimmerman
New Contributor II

Hello,

I am having an issue using the example: https://developers.arcgis.com/javascript/jssamples/exp_history.html

Essentially I am using this to locate structures based on an account number. It seems to be selecting the structures when I click on them, but not when the parameter is passed through the URL.

My github for the project is:  https://github.com/jrzimmerman/AccountParam/blob/master/accountparam.htm

Live: http://207.255.7.12/AccountParam/accountparam.htm?accountno=1035556

Any help is greatly appreciated!

Thanks,

Justin Zimmerman

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Justin ,

   Your issue is simple your AccountNo field is a double and your query where clause is setup for a string query.

Is currently:

query.where = "AccountNo = '" + accountno + "'";

Should be:

query.where = "AccountNo = " + accountno;

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Justin ,

   Your issue is simple your AccountNo field is a double and your query where clause is setup for a string query.

Is currently:

query.where = "AccountNo = '" + accountno + "'";

Should be:

query.where = "AccountNo = " + accountno;
0 Kudos
JustinZimmerman
New Contributor II

Thanks Robert! I am glad it was an easy fix, I should've thought about the field data type. Thanks!

0 Kudos