UI Only Picklist not showing value

UI Only picklist with manually created entries not displaying values on the page. I have a pageload snippet that loops through the picklistEntries and identifies one that matches a field on the record. I set that as the selectedItem, but nothing shows up on the actual page.

var uionlyPicklist = termModel.getField('UIOnlyPicklist'); for(var index = 0; index < uionlyPicklist .picklistEntries.length; index++) { if(uionlyPicklist .picklistEntries[index].value == newPicklistValue) { uionlyPicklist .selectedIndex = index; } }


 newPicklistValue is the value retrieved from another field on the model.

I’ve been poking away at this for a day now, it seems like until I try to edit it on the page it is showing up as undefined when I search for it on the model. Even though I am attempting to assign a value to it.

I am setting both the value of this field and the selectedIndex. Both show up when I pull the row and field up in the console, but I cannot see them on the page. I tried putting this in a render snippet, but that makes it so I can’t even edit the field to get it to show up…

Jerry,

Are you trying to ‘preset’ the UI only field on page load?  Why not update the value of the UI Only field instead of trying to set the picklist item to show?

Thanks,

Bill