Skuid Custom Field Renderer not running for first item in Table

I am using Skuid in Salesforce and I created Table component which includes the RecordTypeId field. I have that field’s Field Renderer set to Custom and have it running a custom snippet. 

When the page loads, RecordTypeId appears as blank for the first record. It renders correctly for all the other list items. When I go into Edit mode for that first record, the field is rendered correctly.

I added some logging lines to show when the function executes and I noticed that it only runs n-1 times where n is the number of list items.

What am I missing? This is my first time using custom code in Skuid. Thanks in advance!

Here is the beginning of the snippet for reference:

console.log( 'Entering code' );

var params = arguments[0],<br>$ = skuid.$;

( function( skuid, $ ){<br>&nbsp; &nbsp; var snippet = skuid.snippet,<br>&nbsp; &nbsp; &nbsp; &nbsp; ui = skuid.ui;

&nbsp; &nbsp; snippet.registerSnippet( 'GetAvailableRecordTypes', function(){<br>&nbsp; &nbsp; &nbsp; &nbsp; console.log( 'Entering function' );<br>&nbsp; &nbsp; &nbsp; &nbsp; var field = arguments[0],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value = arguments[1],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fieldName =,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model = field.model,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; row = field.row;

FYI, I was able to fix this by removing the function wrapper around the code. I’m new to doing code with Skuid and took this snippet from another post so I’m not sure what the norm is with using functions but in any case, it works now!

Glad to hear you were able to solve it!