Render picklist entries from selected multipicklist values

Matt -

Couple more things I just noticed:

  1. The line of code you have for updateRow contains a problem with “initiatorId” You have it specified with an underscore (initiator_id) and it should be initiatorId. This change should solve your double rendering problem.
field.model.updateRow(field.row, field.id, value, {<b>initiator_id</b>: field._GUID}); 

To

field.model.updateRow(field.row, field.id, value, {<b>initiatorId</b>: field._GUID}); 
  1. The line of code in the block that does the update row uses “interests[0]”. The variable “interests” is a semi-colon delimited string, not an array. So, what this is doing is setting the value to the first character of the semi-colon delimited list. This should likely change to either interestsArray[0] if you want the first item in the list only, or just interests if you want the entire semi-colon list.
value = (interestsArray &amp;&amp; interestsArray.length) ? interests[0] : value;

To

value = (interestsArray &amp;&amp; interestsArray.length) ? interestsArray[0] : value;

OR

value = (interestsArray &amp;&amp; interestsArray.length) ? interests : value;

Here’s a sample page that modifies the “Account Sources” of “Account” using a very similar approach to what your code does but with the fixes above applied. It works as you are expecting yours to work so if after making these changes, you’re code still isn’t working as intended, I’m guessing the field is a dependant picklist possibly?

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
            <field id="AccountSource"/>
         </fields>
         <conditions>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <pagetitle model="Account" uniqueid="sk-3VpoSu-68">
         <maintitle>
            <template>{{Name}}</template>
         </maintitle>
         <subtitle>
            <template>{{Model.label}}</template>
         </subtitle>
         <actions>
            <action type="delete"/>
            <action type="clone"/>
            <action type="share"/>
            <action type="savecancel" window="self"/>
         </actions>
      </pagetitle>
      <basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="edit" uniqueid="sk-3VpoSu-69" buttonposition="">
         <columns>
            <column width="50%">
               <sections>
                  <section title="Basics">
                     <fields>
                        <field id="Name"/>
                        <field id="AccountSource" valuehalign="" type="CUSTOM" snippet="sourcesRenderer"/>
                     </fields>
                  </section>
               </sections>
            </column>
            <column width="50%">
               <sections>
                  <section title="System Info">
                     <fields>
                        <field id="CreatedDate"/>
                     </fields>
                  </section>
               </sections>
            </column>
         </columns>
      </basicfieldeditor>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript>
         <jsitem location="inlinesnippet" name="sourcesRenderer" cachelocation="false">var field = arguments[0]
, $ = skuid.$
, value = skuid.utils.decodeHTML(arguments[1]);
console.log(field);
var sources = 'Foo;Bar;Fiddle;';
if (sources) {
    var sourcesArray = sources.split(';');
    var picklistEntries = field.metadata.picklistEntries;
    picklistEntries.length = 0;
    
    $.each(sourcesArray,function(i,str) {
        if (str) {
            picklistEntries.push(
                { value: str, label: str, defaultValue: false, active: true }
        );
        }
    });
}
if (!value) {
    value = (sourcesArray &amp;amp;&amp;amp; sourcesArray.length) ? sourcesArray[0] : value;
    field.model.updateRow(field.row, field.id, value, {initiatorId: field._GUID});
}
console.log(field);
    
skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value); 
</jsitem>
      </javascript>
   </resources>
   <styles>
      <styleitem type="background" bgtype="none"/>
   </styles>
</skuidpage>