Skip to main content
November 16, 2022
Question

Editable Grid - Record Types - Add Row

  • November 16, 2022
  • 3 replies
  • 0 views

I was working to add a row in an editable grid that uses record types. I kept getting errors with indexing when I tried to use append in the add row link. I found a solution by saving a value into the list as shown:

This seems hacky, but it works. Does anyone know of an easier or better way to do this?

3 replies

stefanhelzle0001
Brainy
November 17, 2022

I never had any issues with append(). Maybe you want to get into more detail about what you observed using append().

larsenr0002
December 12, 2022

),
addRowlink: a!dynamicLink(
label: "Add Group",
value:'recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function'('recordType!{c2131273-7291-4303-b11b-4d502c0de3e7}Component Function.fields.{18b9f077-d7fb-4d68-8b32-4575923a26c0}modelComponentFunctionId':-1),
saveInto: {
a!save(
ri!componentFunction,
append(ri!componentFunction,save!value)
)
}
),

append should work the same way as a normal CDT type variable just make sure the value you are trying to append is created correctly using recordType!ABC( id:1) 

November 16, 2023

Pass an empty record by using parentheses

addRowLink:
  a!dynamicLink(
    label: "Add row",
    value: recordType!Record_Name(),  
    /* Pass an object using a parentheses */
    saveInto: a!save(
      ri!input,
      append(ri!input, save!value)
      )