Collapsible sections

Certified Lead Developer

Hi

Here is my scenario,

I am having section layouts in a interface both were collapsible initially,

When I select the one section it has to expand as usual, Same manner when I select the second section it should expand and other section should go back to collapsible state,

I looking for suggestions to done my task

  Discussion posts and replies are publicly visible

Parents
  • Hi Srinivas,

    You can use the mentioned condition in the showWhen field inside the section layout component to acheive your requirement, for example:
    load(
    local!sectionvalue,
    with( a!formLayout(
    label:"Check Collapsiable Section Layout",
    contents: {
    a!sectionLayout(
    label:"Section 1",
    showWhen:if(tointeger(local!sectionvalue)=1,true,false())
    ),
    a!buttonLayout(
    secondaryButtons:a!buttonWidget(
    label:"expand section 1",
    saveInto:a!save(local!sectionvalue,1)
    )
    ),
    a!sectionLayout(
    label:"Section 2",
    showWhen:if(tointeger(local!sectionvalue)=2,true,false())
    ),
    a!buttonLayout(
    secondaryButtons:
    a!buttonWidget(
    label:"expand section 1",
    saveInto:a!save(local!sectionvalue,2)
    )
    )
    }
    )
    )
    )
Reply
  • Hi Srinivas,

    You can use the mentioned condition in the showWhen field inside the section layout component to acheive your requirement, for example:
    load(
    local!sectionvalue,
    with( a!formLayout(
    label:"Check Collapsiable Section Layout",
    contents: {
    a!sectionLayout(
    label:"Section 1",
    showWhen:if(tointeger(local!sectionvalue)=1,true,false())
    ),
    a!buttonLayout(
    secondaryButtons:a!buttonWidget(
    label:"expand section 1",
    saveInto:a!save(local!sectionvalue,1)
    )
    ),
    a!sectionLayout(
    label:"Section 2",
    showWhen:if(tointeger(local!sectionvalue)=2,true,false())
    ),
    a!buttonLayout(
    secondaryButtons:
    a!buttonWidget(
    label:"expand section 1",
    saveInto:a!save(local!sectionvalue,2)
    )
    )
    }
    )
    )
    )
Children
No Data