It's Friday, so I'm compelled to ask a question regarding Attribute Assistant.
Today I'm trying to get the Create_Linked_Record method to work. The online description says:
Creates a new record in a feature layer with a relationship to a table using a primary/foreign key relationship.
I can get that to happen. So far so good.
The online description also goes on the say:
Target Fields | Field names | List of fields the related record layer/table to which values will be copied. The list of field names are in the format field1,field2,etc. List must have the same number of values as the Source Fields. |
Source Fields | Field name | List of fields in the source record to copy to the target related record. The list of field names are in the format field1,field2,etc. List must have the same number of values as the Target Fields. |
Which sounds really cool, right?! It should create a record (it does) and populate respective fields in the target table from the source table (it doesn't; at least for me...) My dynamic table record looks like this:
TableName: MasterStreetFC (this is the source data, a point feature class)
Field Name: <Null>
Value Method: CREATE_LINKED_RECORD
Value Info: MasterStreetAliasTable|BEGINVALUE,ENDVALUE|BEGINVALUE,ENDVALUE|MASTERSTR_ID|MASTERSTR_ID
(target table|target fields|source fields|primary key|foreign key
But all I get is a record created with the MASTERSTR_ID populated. In the source data, MasterStreetFC, I add values to BEGINVALUE and ENDVALUE when I create a point (On Create = True). I like to use the same field names in the source and the target; nothing from the BEGINVALUE ENDVALUE source fields make the trip to the alias table.
Has anyone had luck with this method?
Solved! Go to Solution.
After working with Michael Miller off line, we were able to get a solution worked out:
Use the CREATE_LINKED_RECORD to do just that; create a record in the related table.
Use subsequent UPDATE_LINKED_RECORD method entries in the DynamicTable to update each item in the related table:
What is being reported in the log file?
I neglected to check it; I need to get in that habit. I'll be back at this next Friday and take a look at it. Thanks for the response!
Michael: Here is the entry from the logfile this morning that refers to the CREATE_LINKED_RECORD:
Row Info
Row Number 22
TableName: MasterStreetNameFC
FieldName:
ValueInfo: MasterStreetAliasTable|BEGINVALUE,ENDVALUE|BEGINVALUE,ENDVALUE|MASTERSTREET_ID|MASTERSTREET_ID|TRUE
ValueMethod: CREATE_LINKED_RECORD
On Create: 1
On Change: 0
Checking for Subtype Restriction
Field is not specified, empty, or set for all.
Trying: CREATE_LINKED_RECORD
Getting Value Info
Checking values
Checking for table to populate
Trying to create a row in the target table
Row Created
Trying to Copy ID
ID successfully copied
Trying to Copy Value
Row successfully stored
Finished: CREATE_LINKED_RECORD
I would like to copy the values of beginvalue, endvalue, masterstreet_id from the MasterStreetNameFC to the same field names in the MasterStreetAliasTable. It creates a record, and copies only the masterstreet_id:
Nothing stands out as wrong, any chance I could get a copy of the data?
Yes, but I'd rather do it offline. Are you mmiller at esri dot com?
correct
After working with Michael Miller off line, we were able to get a solution worked out:
Use the CREATE_LINKED_RECORD to do just that; create a record in the related table.
Use subsequent UPDATE_LINKED_RECORD method entries in the DynamicTable to update each item in the related table: