Get relation fields definition on featureLayer.queryRelatedFeatures()

735
2
Jump to solution
09-10-2014 03:32 PM
JeremieCornet
New Contributor

Hi !

I'm using layer.queryRelatedFeatures() on a featureLayer and i want to get the relation's fields definition (wich is available on the server json response but not in the queryRelatedFeatures callback).

Is there a  way to get that ? A way to get the raw response ?

Jérémie

0 Kudos
1 Solution

Accepted Solutions
RiyasDeen
Occasional Contributor III

Hi Jeremie,

You can use esriRequest to get the related table definitions. Have a look at this fiddle.

Edit fiddle - JSFiddle

Look for getRelatedFieldDefinition and alertRelatedFieldDefinition functions.

View solution in original post

0 Kudos
2 Replies
RiyasDeen
Occasional Contributor III

Hi Jeremie,

You can use esriRequest to get the related table definitions. Have a look at this fiddle.

Edit fiddle - JSFiddle

Look for getRelatedFieldDefinition and alertRelatedFieldDefinition functions.

0 Kudos
JeremieCornet
New Contributor

Hi Riyas and thanks for your code wich works perfectly.

I would like to avoid aditionnal requests to the server so i think i will use directly an esri request to replace the layer.queryRelatedFeatures(...).

0 Kudos