Hello,
I could not get the relate table why.
I checked it like a document, but I can not get it why.
Are you doing something wrong?
Relate features—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers
<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">const</SPAN> <SPAN class="keyword token">string</SPAN> ServiceUrl<SPAN class="operator token">=</SPAN> <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FServiceRequest%2FFeatureServer%2F0" target="_blank">http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0</A><SPAN>"</SPAN></SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Create feature table for the incident feature service</SPAN>
<SPAN class="keyword token">var</SPAN> relateFeatureTable <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ServiceFeatureTable</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Uri</SPAN><SPAN class="punctuation token">(</SPAN>ServiceUrl<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> relauteFeatureLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN>relateFeatureTable<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">:</SPAN>
<SPAN class="punctuation token">:</SPAN>
<SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token">// Identify a feature in the 'service request' layer (from a tap on the map, for example)</SPAN>
IdentifyLayerResult idResult <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">await</SPAN> MyMapView<SPAN class="punctuation token">.</SPAN><SPAN class="token function">IdentifyLayerAsync</SPAN><SPAN class="punctuation token">(</SPAN>relauteFeatureLayer<SPAN class="punctuation token">,</SPAN> e<SPAN class="punctuation token">.</SPAN>Position<SPAN class="punctuation token">,</SPAN> <SPAN class="number token">5</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
ArcGISFeature serviceRequestFeature <SPAN class="operator token">=</SPAN> idResult<SPAN class="punctuation token">.</SPAN>GeoElements<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FirstOrDefault</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> ArcGISFeature<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>serviceRequestFeature <SPAN class="operator token">==</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">return</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">// Get the feature table from the feature</SPAN>
ArcGISFeatureTable serviceRequestTable <SPAN class="operator token">=</SPAN> serviceRequestFeature<SPAN class="punctuation token">.</SPAN>FeatureTable <SPAN class="keyword token">as</SPAN> ArcGISFeatureTable<SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Get a list of tables related to the 'service requests' feature table</SPAN>
IReadOnlyList<SPAN class="operator token"><</SPAN>ArcGISFeatureTable<SPAN class="operator token">></SPAN> relatedTables <SPAN class="operator token">=</SPAN> serviceRequestTable<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetRelatedTables</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">// Assume the comments table is the first (only?) related table</SPAN>
<SPAN class="comment token">// (if there are many related tables, you can loop through the collection and check the table name)</SPAN>
ArcGISFeatureTable commentsTable <SPAN class="operator token">=</SPAN> relatedTables<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FirstOrDefault</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>