Select to view content in your preferred language

Rename relationships

1522
1
10-15-2014 06:57 AM
MattiasEkström
Regular Contributor

I've just started to use related records in popups in my ArcGIS Viewer for Flex application, I have a problem when using multiple relationships. The buttons used to switch between relationships shows the name of the relationships shown in the Rest Service Directory, but those names are long and ugly and I can't find a way to rename them. The tables I'm relating to are query layers from an Oracle database (not SDE), even if I rename the table in the TOC it still has some kind of name in the background that is something like [ORACLEUSER].%[TABLENAME] and if I change the SQL-query for the layer an underscore an a digit is added to that name. And that name is also used to name the relationship as it appears in the service directory, and that's what shows to the end user in the popup. Se attached images for an example.

Is there any way to rename the relationship in ArcMap that will affect the name in the published map service?

If not does anyone know if it's possible to rename the buttons in the code? I've been trying to customize the RelationshipInspectorSkin.mxml without any luck so far, can't access the actual buttons, just the HGroup they are put in.

0 Kudos
1 Reply
MattiasEkström
Regular Contributor

Obviously the best solution would be to be able to rename the relationship.
However I've continued to look in to the coding work around by modifying the RelationshipInspectorSkin. I can acces the buttons and change their labels by using relationshipButtonsGroup.getElementAt() as Togglebutton (tried with Button first when I couldn't get it to work). Now I want to rename the Toggle buttons to the name of the related table for each relationship. The problem is that I can only get the table name for the active relationship (using hostComponent.activeRelatedFeatureLayer.tableDetails.name) when looking at the array of relationships, each relationship contains the table id but not the name. Any ideas on how to get the table name by using the table id? 

0 Kudos