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

Certified Senior Developer

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

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hello ,

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

  • 0
    Certified Senior Developer
    in reply to SandhyaSalmeda

    Hello ,

    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"
          )
        }
      )
    }

  • Whenever i create a second or third section, the value of my first one is moving over and then appneding and overwriting all other sections. how do i fix this

  • 0
    Certified Senior Developer
    in reply to richarde5889

    Hello   Could you please share the code?


  • 0
    Certified Senior Developer
    in reply to richarde5889

    You do not have to pass the value in the dynamic link in such a way. your a!save() should do the work. or in the a!save() where you append, you can use the below code. (Also check if your rule input is configured as an array value)

    For the value and Savinto of the input fields you can write in the below format (Please replace the fields accordingly)
    
    value:fv!item['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}'],
                  saveInto: fv!item['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}']
    
    for the saveinto of Dynamic link
    
    a!save(
                  ri!record['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'],
                  append(
                    ri!record['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'],
                    'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'(
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{b318d07d-7814-49d9-96a8-9c825541b276}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{92da6e9f-839e-45cf-927e-ae547e04acb4}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{1ba0c9fc-4766-4554-978e-c78972a4a091}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}': null
                    )
                  )
                )

Reply
  • 0
    Certified Senior Developer
    in reply to richarde5889

    You do not have to pass the value in the dynamic link in such a way. your a!save() should do the work. or in the a!save() where you append, you can use the below code. (Also check if your rule input is configured as an array value)

    For the value and Savinto of the input fields you can write in the below format (Please replace the fields accordingly)
    
    value:fv!item['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}'],
                  saveInto: fv!item['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}']
    
    for the saveinto of Dynamic link
    
    a!save(
                  ri!record['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'],
                  append(
                    ri!record['recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'],
                    'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}'(
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{b318d07d-7814-49d9-96a8-9c825541b276}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{92da6e9f-839e-45cf-927e-ae547e04acb4}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{1ba0c9fc-4766-4554-978e-c78972a4a091}': null,
                      'recordType!{541a338c-895a-48c6-99f0-86f4df394eba}.relationships.{d078e013-86e1-46ec-87b2-13a756c12db6}.fields.{6ed73606-0b20-46c2-81ee-882bfef03302}': null
                    )
                  )
                )

Children
No Data