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
  • use a flag variable and define conditions, sample code is below:
    load(
    local!toHide:true,
    local!buttonVal,
    a!sectionLayout(
    label:"Section 1",
    contents:{
    a!textField(
    label:"First Name"

    ),
    a!buttonLayout(
    primaryButtons:{
    a!buttonWidget(
    label:"Submit",
    value:true,
    saveInto:{
    local!buttonVal,
    a!save(
    local!toHide,
    false
    )
    }
    )
    }
    )
    },
    showWhen:if(local!toHide=true,true,false)
    )
    )
Reply
  • use a flag variable and define conditions, sample code is below:
    load(
    local!toHide:true,
    local!buttonVal,
    a!sectionLayout(
    label:"Section 1",
    contents:{
    a!textField(
    label:"First Name"

    ),
    a!buttonLayout(
    primaryButtons:{
    a!buttonWidget(
    label:"Submit",
    value:true,
    saveInto:{
    local!buttonVal,
    a!save(
    local!toHide,
    false
    )
    }
    )
    }
    )
    },
    showWhen:if(local!toHide=true,true,false)
    )
    )
Children
No Data