Set properties in a FeatureTable displaying related records

546
4
Jump to solution
03-24-2020 01:52 AM
MaximSpikin1
New Contributor II

How to set column properties (visible, label, width) in a FeatureTable displaying related records?

For example, how to turn off "ObjectID" field in this sample FeatureTable - related records | ArcGIS API for JavaScript 3.31 .

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Ah, thank you Ken Buja‌. Now I think I understand. The related records display is by design, and is not configurable with the 3x FeatureTable dijit. The 4x FeatureTable widget (due to release soon) will have the ability to edit and configure related records later this year, so Maxim Spikin‌ if you're able, I would consider moving to the 4x version of the ArcGIS API for JavaScript and you will be able to make these sorts of configurations in the near future. There is a bit of a hacky workaround for 3x, but it's not recommended.

View solution in original post

0 Kudos
4 Replies
Noah-Sager
Esri Regular Contributor

Hi,

In this sample: ArcGIS API for JavaScript Sandbox 

I don't see any object IDs, only the fields listed in the outfields property on line 177.

These are controlled by the outfield property, (if it's in the list then it's visible, and the label comes from the Alias of the field) documented here: FeatureTable | API Reference | ArcGIS API for JavaScript 3.31 

I don't know if you can configure the width of the columns, but perhaps in the CSS you could make modifications:
FeatureTable | API Reference | ArcGIS API for JavaScript 3.31 

0 Kudos
KenBuja
MVP Esteemed Contributor

Noah Sager

If you click "Show" in the "groupBySummary" field, this shows the related table with the ObjectID field that Maxim wants to suppress.

0 Kudos
Noah-Sager
Esri Regular Contributor

Ah, thank you Ken Buja‌. Now I think I understand. The related records display is by design, and is not configurable with the 3x FeatureTable dijit. The 4x FeatureTable widget (due to release soon) will have the ability to edit and configure related records later this year, so Maxim Spikin‌ if you're able, I would consider moving to the 4x version of the ArcGIS API for JavaScript and you will be able to make these sorts of configurations in the near future. There is a bit of a hacky workaround for 3x, but it's not recommended.

0 Kudos
MaximSpikin1
New Contributor II

Thanks, 

I will try the version of FeatureTable in js api 4.x

0 Kudos