Skip to main content
sandhyas0002
November 16, 2023
Question

Same Section Need to be added when we click on a button just like a add row link

  • November 16, 2023
  • 8 replies
  • 0 views

How can I get a same section when we click on a button under the section to provide multiple details to the single ruleinput just like adding address1,address2,address3

    8 replies

    stefanhelzle0001
    Brainy
    November 16, 2023

    I assume you have a list of records. Then you use a foreach to display each item in that list. Just append another item to the list and it will show up.

    konduruc733182
    November 27, 2023

    Hello sandhyas0002,

    Is this resolved? If not could you please elaborate what o you mean by section. Is it a section that you want or field?

    sandhyas0002
    November 28, 2023

    complete section

    konduruc733182
    November 28, 2023

    Hello sandhyas0002,

    Could you please check the below interface and confirm if this is what you are looking for.



    If yes try to use the below expression and edit accordingly

    {
      a!forEach(
        items: ri!arrayValue,
        expression: {
          a!sectionLayout(
            label: "My Section " & fv!index,
            contents: {
              a!richTextDisplayField(
                align: "RIGHT",
                value: {
                  a!richTextIcon(
                    icon: "times-circle",
                    color: "NEGATIVE",
                    link: a!dynamicLink(
                      saveInto: a!save(
                        ri!arrayValue,
                        remove(ri!arrayValue, fv!index)
                      )
                    ),
                    linkStyle: "STANDALONE"
                  )
                }
              ),
              a!textField(label: "Text Field"),
              a!dropdownField(placeholder: "--- Select ---"),
              a!dateField(label: "Select Date")
            }
          )
        }
      ),
      a!richTextDisplayField(
        value: {
          a!richTextItem(
            text: "+ Add New Section",
            link: a!dynamicLink(
              value: null,
              /*Your value here*/
              saveInto: a!save(
                ri!arrayValue,
                append(
                  ri!arrayValue,
                  null/*your value here*/
                  
                )
              )
            ),
            linkStyle: "STANDALONE"
          )
        }
      )
    }