I have a button that loads some standalone tables that are in a 1:M relationship classes with other layers. I
want to set the DisplayField property of the related tables to the date field so my users can see the date attributes in the popups.
How do I go about this? I'm at a loss on where to go from here.
public void SetDisplayField(string tableName, string fieldName)
{
var mapView = MapView.Active.Map;
QueuedTask.Run(() =>
{
IReadOnlyList<StandaloneTable> tables = mapView.FindStandaloneTables(tableName);
foreach (var table in tables)
{
var cimTableDefinition = table.GetDefinition() as CIMStandaloneTable;
var displayField = cimTableDefinition.DisplayField;
}
});
}