Editable grid with Record type examples

hi 

can someone provide me with example codes about Editable grid with record types ? all of the examples use dummy data and not record types and i am struggling and don't know how to replace the data with record types without getting errors. 

for example, here is a code , i need to link it with a record type and then get the appian id doc. and the document name , then save them in their fields.  

but when replace [Record Field for Document Name], with my actual record type it does not work  and keep getting invalid indexing types errors. 

a!localVariables(
  local!document: Data of Record Query,
  {
  a!gridLayout(
    totalCount: count(local!document),
    headerCells: {
      a!gridLayoutHeaderCell(label: "Document" ),
      a!gridLayoutHeaderCell(label: "Name" ),
      a!gridLayoutHeaderCell(label: "Classification" ),
      a!gridLayoutHeaderCell(label: "Updated By" ),
      a!gridLayoutHeaderCell(label: "Updated On" ),
    },
    columnConfigs: {
      a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ),
      a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ),
      a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ),
      a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:3 ),
      a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight:2 ),

    },
    rows: a!forEach(
      items: local!document,
      expression: a!gridRowLayout(
        contents: {
          a!fileUploadField( value: fv!item[Record Field to upload],
          saveInto: fv!item[Record Field to upload],buttonStyle: "STANDARD",buttonDisplay: "ICON"),

          a!textField(
            value: fv!item[Record Field for Document Name],
            saveInto: fv!item[Record Field for Document Name],
            required:true
          ),
          a!textField(
            value: fv!item[Record Field classification],
            saveInto: fv!item[Record Field classification],
            required:true
          ),
          a!textField(
            value: fv!item[Record Field for Uplaoded By],
            saveInto: fv!item[Record Field for Uplaoded By],
            required:true
          ),
          a!dateField(
            value: fv!item[Record Field for Date],
            saveInto: fv!item[Record Field for Date],
            required:true,
            align: "RIGHT"
          ),
        },
        id: fv!index
      )
    ),
    addRowlink: a!dynamicLink(
      label: "Add Document",
      value: {
        startDate: today() + 1
      },
      saveInto: {
        a!save(local!document, append(local!document, save!value))
      }
    ),
    rowHeader: 1
  )
  }

)

 

  Discussion posts and replies are publicly visible