I’d like to use a custom field renderer to set the value for a reference field if a value doesn’t exists. Here’s my code:
<br>'renderUserId': function (field, value) {<br>if (!value) {<br>value = skuid.utils.userInfo.userId;<br>var fieldId = field.id;<br>var fieldName = fieldId.slice(0,-1) + 'r.Name';<br>field.model.updateRow(<br>field.row,<br>{<br>fieldId: value,<br>fieldName: skuid.utils.userInfo.userName<br>},<br>{initiatorId: field._GUID}<br>);<br>}<br>skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field, value);<br>}
It’s kind of working, but I’m getting the 18 digit record Id displaying in the field, instead of the Name. I tried changing ‘value’ to ‘skuid.utils.userInfo.userName’ in the renderer, but got the same result.
Help?
Thanks!