How to add a row when a link(Icon) is clicked (not in grid)

Hi All,

I am having a requirement like image 1 mentioned below

i have created a section(rule) which will have all the UI components as shown in the image 1.When the + icon gets clicked another row should get added and should display like image 2.

mentioned below.

Kindly provide your suggestions regarding this requirement.

 

Thank you.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to pradeepb0001
    Here's something along the lines of what you want. I think you have your gridrow configured correctly, so just focus on the image component.

    load(
    local!testCDT: type!CDTType(),
    {
    a!sectionLayout(
    label: "Section",
    contents: {
    a!gridLayout(
    label: "Editable Grid",
    labelPosition: "ABOVE",
    headerCells: {
    a!gridLayoutHeaderCell(label: "Header Cell")
    },
    rows: a!forEach(
    items: if(
    or(
    rule!APN_isEmpty(local!testCDT),
    count(local!testCDT) < 1
    ),
    {},
    1+enumerate(count(local!testCDT))
    ),
    expression: rule!/* your rule for your grid row layout here */
    ),
    a!imageField(
    images: {
    a!documentImage(
    document: a!iconIndicator("ADD"),
    link: a!dynamicLink(
    value: local!testCDT,
    saveInto: a!save(local!testCDT, append(local!testCDT, type!CDTType())
    )
    )
    }
    )
    }
    )
    }
    )
  • Thank you Omere for your help and it really helped me.