remove the sectionlayout using button

Certified Lead Developer

hi,
i using button component to remove the section layout,
i am using the following code

a!sectionLayout(
contents: {
a!textField(
label: "Risk 1",
labelPosition: "ABOVE",
placeholder: "<Insert a transaction Risk.>",
value: ri!input.Risk1,
saveInto: ri!input.Risk1,
align: "CENTER"
),

after this i using the remove() function,
"saveInto:{

a!save(ri!input.Risk1,remove(ri!input.Risk1,index(ri!input)))

}
i am unable to delete the section 
i looking for suggestion to modify the scripts and work done.

regards 
srinivas

  Discussion posts and replies are publicly visible

Parents
  • for removing the section do the following:
    load(
    local!showSection:true(),
    with(
    a!formLayout(
    firstColumnContents:{
    if(local!showSection,
    a!sectionLayout(
    firstColumnContents:{
    //sectionlayout contents
    }
    )
    , {}
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label:"Show Section",
    value: not(local!showSection),
    saveInto: local!showSection
    )
    )
    )
    ))
Reply
  • for removing the section do the following:
    load(
    local!showSection:true(),
    with(
    a!formLayout(
    firstColumnContents:{
    if(local!showSection,
    a!sectionLayout(
    firstColumnContents:{
    //sectionlayout contents
    }
    )
    , {}
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label:"Show Section",
    value: not(local!showSection),
    saveInto: local!showSection
    )
    )
    )
    ))
Children
No Data