Specify gdbVersion for the IdentifyTask

704
6
Jump to solution
03-19-2019 02:20 PM
NaciDilekli
Occasional Contributor

I have a project that makes use of multiple GDB versions that I use for editing. My mapper also has an identify tool, and as expected it returns the identify results of the default version (default SDE). I saw in the docs that one could use the options property to specify the gdbVersion. So I wrote the following line:

identifyTask = new IdentifyTask(systemURL, versionName);

But the identify is still returning the results from the default SDE version. Does anyone have any experience with this?

Thanks, Naci

0 Kudos
1 Solution

Accepted Solutions
NaciDilekli
Occasional Contributor

Figured it out by some wild guess. Passed the following JSON object (not just the string) and voila. 

{'gdbVersion': 'sde.' + sysName + 'Editor'}

Hey ESRI support, someone should fix the JS documentation. 

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Naci,

   Are you passing the version name as a string?

0 Kudos
NaciDilekli
Occasional Contributor

Yes Robert, versionName holds a string value.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

What are you passing? It is expecting a value like this "sde.USER1"

0 Kudos
NaciDilekli
Occasional Contributor

This is exactly what I am passing. And I checked the string against the list of versions in the database. 

identifyTask = new IdentifyTask(baseSystemMapServerURL, 'sde.' + sysName + 'Editor');
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Naci,

   That is what is suppose to work. You should call esri tech support.

0 Kudos
NaciDilekli
Occasional Contributor

Figured it out by some wild guess. Passed the following JSON object (not just the string) and voila. 

{'gdbVersion': 'sde.' + sysName + 'Editor'}

Hey ESRI support, someone should fix the JS documentation.