Select to view content in your preferred language

Bug in QueryRelatedRecords ArcGIS Server?

2520
1
10-27-2015 11:04 AM
TimDine
Occasional Contributor II

I have a feature services published with a point layer and a table.  They are related via a primary/foreign key and have an established relationship class.  The feature service is published pointing to version A which is one level under Default.  Version B is under version A.

Default -> A -> B

I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table.  I have some records returned as expected.

I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = A.  I have some records returned, same result as no gdbVersion.

I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = B.  I have the same records returned as if I did not use the gdbVersion option or handed it version A.

I run the queryRelatedRecords method on the point layer referencing the relationshipID of the table and give it gdbVersion = C (which doesn't exist). No records are returned and an error message is presented.

Is anyone able to confirm this behavior or if a bug exists?  I am using ArcGIS Server 10.21 on Windows.

Thanks.

0 Kudos
1 Reply
TimDine
Occasional Contributor II

At the moment I've been able to build a work around using the properties of the relationship object under the Feature layer to get the Layer Name, and Key Field.  Since the key field has the same name in both feature classes and the related layer has been also added as a feature layer I can find it through the map object and run the query function on that layer using the key field. 

It isn't as awesome, and it has the holes of requiring the key fields to be the same and layers in the map.  At least it doesn't require a config file to map between the two layers.

It'd still be great if someone could confirm they also see this bug or that theirs works fine.  The key to the bug is that it accepts the gdbVersion parameter, but doesn't honor it going instead to the version configured in the feature service.

0 Kudos