Editor widget to add records in a relationship class?

2022
2
Jump to solution
09-04-2013 10:36 AM
MattSimmons
Occasional Contributor
Hi- I have a relationship class set up between two SDE tables.  It's a on-to-many, composite relationship.  In other words, a single point on the map can have many sampling events associated with it.  Those events are linked to the same point using primary key/foreign key relationship.

Is there a way in the Flex Viewer that I can handle adding a single point, and then adding more than one event associated to this point?

I.e in the Edit widget, when you add a point it adds a single record to the table.  Well, on that same Edit widget popup window I want to be able to have an 'Add' button that allows the user to add multiple events that are associated to that one location.  Thoughts?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MattSimmons
Occasional Contributor
I found that this is now supported in Flex Viewer 3.4.  You need to first set up the relationship class in the database.  Second, in the FlexViewer Application Builder, the map service needs to be loaded as a dynamic service as opposed to being loaded as a feature layer.  Third, in the pop up for the layer, the "show related records" needs to be set to "On."  So when a point is added it's using the edit widget the point is added using the feature layer, but in the popup and/or attribute widget window it's using the dynamic map service.  Furthermore, you can use the Attribute Widget to add a related record to a record.

View solution in original post

0 Kudos
2 Replies
MattSimmons
Occasional Contributor
I found that this is now supported in Flex Viewer 3.4.  You need to first set up the relationship class in the database.  Second, in the FlexViewer Application Builder, the map service needs to be loaded as a dynamic service as opposed to being loaded as a feature layer.  Third, in the pop up for the layer, the "show related records" needs to be set to "On."  So when a point is added it's using the edit widget the point is added using the feature layer, but in the popup and/or attribute widget window it's using the dynamic map service.  Furthermore, you can use the Attribute Widget to add a related record to a record.
0 Kudos
OlegLukyanov
New Contributor III
How can I add ore delete related records from to\ related table?
0 Kudos