I have a custom SharePoint 2010 SPfield of type SPFieldMultiColumn. The data in this column is stored in a delimited string, which is parsed and rendered in a readable format in most areas (list view, 'view properties' etc). The raw data looks like this (wording changed):
and so on. The descriptions are pretty long, making this string hundreds of characters long, and really ugly when not parsed out and rendered. The issue with this is that in certain parts of the system, we cannot control the rendering of the field. The most common issue we see is in datasheet view, where the raw data is displayed and just looks terrible, and makes datasheet nearly unusable for users. The data also shows up in alert emails and search results.
I was tasked with making this 'prettier' and my solution was to add a secondary, 'display' column, and to hide the 'data' column. When an item is updated or added, I have event receivers which transform and move the data into the display field, which looks nice in datasheet view and so on.
This all works great, except for the fact that it requires 2 Update() calls on each item that gets this metadata. One when the 'data' field is populated, and another when the event receiver copies the data into the display.
Our production (and QAS, but not test or development) farms utilize Remote Blob Storage (RBS), and our operations team has found that whenever this column (or I guess any column) is updated on an office document (doc, docx, etc) it causes a new blob in the file system. So as the solution is today, a new file uploaded will generate 2 blobs (one for the upload, one for the application of this metadata). With this new eventreceiver, we will now generate 3 blobs, which is unnacceptable to our operations team (we don't have 50% more disk space to support this).
'Fixing' RBS is out of the question - so I need to somehow update both of these columns at once, rather than updating one, which fires an event receiver to update the other.
Is there any way to update 2 custom SPFields with 1 call to Update()?
TL;DR: Custom solution with 2 custom SPFields - one updated through the 'edit' form, the other through an event receiver (second is completely reliant on the first for it's data). How can I update both without the use of an event receiver (with only one Update() call?)