Hi all,
Here's my solution to the foreign key error. 3 years later, but who knows, it might help someone 🙂
-----Layer preparation for Parcel Drafter-----
Create a file geodatabase and create the following layers:
- Line layer:
- Bearing (double)
- Distance (double)
- Radius (double)
- ArcLength (double)
- ChordLength (double)
- SequenceID (double)
- Note: SequenceID has to be entered as written, otherwise the attribute won’t be recognized in the parcel drafter tool.
- LineType (double)
- Polygon layer:
- Rotation (double)
- ClosingRate (double)
- Zone (Text)
- Scale (double)
- ClosingDistance (double)
- Relation class between the two layers:
- Origin table: the Polygon layer
- Destination table: the line layer
- Note: The relation must be from the polygon to the line, otherwise there won’t be a foreign key and you would get the “Invalid foreign key” error.
- Origin Foreign key is the objectID
Share layers to portal
To Keep the relation when uploading the layers, you must publish the layers from a map containing only the related layers. To make sure the relation is active, check that there is a relation in the “relates” tab of the properties of each layer.
Click on the share tab and in the share as group, click on web layer and then publish web layer. See this post for more details.
In the sharing options, you must share the layer as a hosted layer (under “copy all data”, select “feature”). If you reference the layer, you will have an “invalid foreign key” error.
If you have done this step correctly, you should have one feature layer in your portal content, which has the 2 layers in it.
Set up the parcel drafter tool
In the parcel drafter tool, select the wanted polygon layer. Some fields should automatically be completed. If you have followed every step, you should have a foreign key and Sequence ID already filled in. Fill in the connection line and limit line values with 0 and 1.
Complete the set up by choosing the attributes corresponding to the COGO values and add fields for the geometry information of the coordinates.