<< Click to Display Table of Contents >> Navigation: Collect > Troubleshooting > Sync Issues |
This article provides suggestions for common issues that users might experience when syncing data.
Symptom: A user recieves the "The given key 'EarthSoft.Collect.Core.Model.Data.ParameterFormData' was not present in the dictionary" error when syncing a data form with another user.
Cause: This error occurs when a Form Lookup field is populated with an invalid #ID. Typically, the cause is when a non-valid #ID value is populating the Default attribute of the Form Lookup field. The Form Lookup field stores an #ID value (i.e., an autogenerated integer that is generally hidden and is used to uniquely identify a record in Collect Mobile) that matches the form chosen by the user. The #ID value stored in the Form Lookup field is the key in the key-value pair and is used to match the record called upon in the Form Lookup field. When the #ID is invalid, the key-value pair fails to be matched and the error is thrown.
Solution: Review all Form Lookup fields to ensure they are not populated, either by pre-population, hard-coded values, or Default attribute values.
Symptom: After a user syncs their data form with another user, a record is duplicated, (i.e., instead of merging both users' records together, the records remain independent of one another during the sync process).
Cause: Duplicate records occur when data sets are not correctly configured and contain volatile fields. Volatile fields are fields whose values can change with user input.
Example: In the scenario below, the SYS_SAMLPE_CODE is a concatenation of the following fields: TASK, SYS_LOC_CODE, SAMPLE_TYPE, and MATRIX. When the SYS_SAMPLE_CODE is pre-populated, the TASK and SYS_LOC_CODE are pre-populated, but the SAMPLE_TYPE and MATRIX fields are added when the user populates the associated fields with data.
The SYS_SAMPLE_CODE is the field defining the data set for this form.
User 1 fills out the B-30 record SAMPLE_TYPE and MATRIX code, meaning the SYS_SAMPLE_CODE is now TaskA_B-30_GW_N. User 2's SYS_SAMPLE_CODE is the pre-populated value of TaskA_B-30. When User 1 and User 2 sync their records, Collect cannot recognize that the two B-30 records are supposed to sync with each other to produce a single record because their data sets no longer match. In the resulting data form, the B-30 records remain distinct.
Solution: Review your data sets to ensure that the fields included are not volatile.
Symptom: The Object Reference not set to the instance of an Object error can occur for multiple reasons:
Cause 1: The Clear Invisible attribute is triggered for all fields in the data set. If a field has Clear Invisible enabled, the field will be cleared upon saving if the Visible attribute evaluates to FALSE. If all fields in the data set match this scenario, when the data set will be empty when the record is saved. This prevents the Sync Data feature from syncing records, as Collect cannot recognize which records are supposed to be merged together and which records are supposed to be kept separated in the resulting data form.
Solution: Ensure the Clear Invisible setting is disabled for all fields in the data set. If you want to keep the Clear Invisible functionality enabled for the field, consider omitting the field from the data set.
Cause 2: A child form record is pre-populated but the parent form is not pre-populated, or the parent form is pre-populated after the child form due to a lack of #parent_#id and #id relationships defined in the pre-population.
Solution: Ensure that when a child form record is being populated, a parent-child relationship is defined in the pre-population as outlined in the Parent-Child Relationships in Collect Templates article.
Copyright © 2024 EarthSoft, Inc. • Modified: 01 Nov 2023