ri! hours, an array code: =load( /* Needed when adding or removing items via a!applyComponents `*/ local!hoursToken, a!formLayout( label: "SAIL Example: Inline Editable Grid", firstColumnContents: { a!gridLayout( headerCells: { a!gridLayoutHeaderCell(label: "Project"), a!gridLayoutHeaderCell(label: "Role", align: "RIGHT"), a!gridLayoutHeaderCell(label: "Date", align: "RIGHT"), a!gridLayoutHeaderCell(label: "Hours", align: "RIGHT"), a!gridLayoutHeaderCell(label: "User", align: "RIGHT"), /* For the "Remove" column */ a!gridLayoutHeaderCell(label: "") }, /* Only needed when some columns need to be narrow */ columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE"), a!gridLayoutColumnConfig(width: "DISTRIBUTE"), a!gridLayoutColumnConfig(width: "NARROW"), a!gridLayoutColumnConfig(width: "DISTRIBUTE"), a!gridLayoutColumnConfig(width: "DISTRIBUTE"), a!gridLayoutColumnConfig(width: "NARROW") }, rows: a!applyComponents( function: rule!PX_LI_ucItemRowEach( hours: ri!hours, index: _, hoursToken: local!hoursToken ), array: if(or(isnull(ri!hours), count(ri!hours) < 1), {}, 1+enumerate(count(ri!hours))), arrayVariable: local!hoursToken ) ), a!linkField( label: "Add Link", labelPosition: "COLLAPSED", links: a!dynamicLink( label: "+Add Item", /* * For your use case, set the value to a blank instance of your CDT using * the type constructor, e.g. type!PurchaseRequestItem(). Only specify the field * if you want to give it a default value e.g. due: today()+1. */ value: {id: null, hours: null, date: null, user: null, role: null, project:null, status: null}, saveInto: { a!save(ri!hours, append(ri!hours, save!value)), /*` When modifying the size of the array used in a!applyComponents, */ /* make the same change in the "token" array variable */ a!save(local!hoursToken, append(local!hoursToken, save!value)) } ) ) }, buttons: a!buttonLayout( primaryButtons: a!buttonWidgetSubmit( label: "Submit" ) ) ) )