Using the Bulk Import Tool to Edit Populated Lookup Fields

Well, I thought I had it all figured out with my review of the Bulk Import
Tool….specifically with regards to using the Bulk Import Tool to perform bulk edits of existing data. 

Looks like I may have missed one key element.

Recently when trying to edit a group of existing projects, the tool kept returning an error of customfieldmaxvaluesexceeded.  The weird thing was that the error wouldn’t occur on every project, but only some projects – and then not on the same projects in DEV and PROD.

After playing with a couple scenarios, I think that I’ve figured out the issue.

The Bulk Import Tool will return the customfieldmaxvaluesexceeded under the following circumstances:

  1. The user is attempting to edit a field connected to a lookup table.
  2. The field is already populated.
  3. The new value is different than the original value.

This issue will not occur when the new value is the same as the old value, or if the lookup value is blank before the edit.

I am still trying to identify a valid workaround, but for now, I might make the following recommendations:

  1. Manually edit those projects and clear out the lookup values.  Although, of course, by the time you do that, you may as well have just set the values correctly.
  2. Export the data into Excel.  Edit in Excel.  Delete the old lookup field, create a new one, and then use the Bulk Import Tool to modify the new data set.
  3. A variant of topic #2, but instead of deleting the field wholesale, simply delete the original value from the lookup table list.  This will blank the fields that contain that specific value.

All in all, I would say that #1 is probably the least work intensive approach to getting around this restriction.

Advertisements
Using the Bulk Import Tool to Edit Populated Lookup Fields

2 thoughts on “Using the Bulk Import Tool to Edit Populated Lookup Fields

  1. George says:

    This is a bug in bulk import utility.
    When dealing with custom field with lookup table, it tries to find the appropriate custom field value by searching with project_uid, md_prop_uid AND code_value. If the custom field is already set and that value is different from the value to be set it creates an another custom field value and adds it to the project custom fields. If the custom field is not multi value, it will fail at the publishing phase.

    The related source is PsDataService.cs, line 459.

    After changing the logic to find the custom field value just by the project_uid and md_prop_uid, and set its value if it is different from the found one, it works as expected.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s