Skip to main content
March 3, 2023
Question

Collapsible Section Label Based on State

  • March 3, 2023
  • 3 replies
  • 0 views

Hello
I have a section that is collapsible but the label has to change based
on the state of the section - any suggestions on how I can implement it
using Appian's built-in features.

I can do it using richTextField but then I can't seem to emulate the
slow animation that Appian's default code does. So, two questions:
Is there a way to change labels based on the state or
Is there a way to emulate the slow animation of the arrow if I create
the section label using richTextField.
a!sectionLayout(
if (sectionIsCollapsed, label:"Show Details", label: "Hide Details")
is it possible to code the slow animation of the arrow as Appian does here?
label:"Show Details", logic to change text to display based on the
state of the section 

Thank you for your assistance

M



a!localVariables(
  local!isExpanded: false(),
  a!sectionLayout(
    label: "Outer Section",
    isCollapsible: true,
    contents: {
      a!richTextDisplayField(
        value: {
          a!richTextIcon(
            linkStyle: "STANDALONE",
            icon: if(
              local!isExpanded,
              "ANGLE-DOWN-BOLD",
              "ANGLE-RIGHT-BOLD"
            ),
            link: a!dynamicLink(
              saveInto: {
                a!save(local!isExpanded, not(local!isExpanded))
              }
            )
          ),
          a!richTextItem(
            linkStyle: "STANDALONE",
            text: if(
              local!isExpanded,
              "Hide Details",
              "Show Details"
            ),
            link: a!dynamicLink(
              saveInto: {
                a!save(local!isExpanded, not(local!isExpanded))
              }
            ), 
          )
        }
      ),
      a!sectionLayout(
        contents: {
          a!richTextDisplayField(
            value: { a!richTextItem(text: "Peek-A-Boo") },
          )
        },
        showWhen: local!isExpanded
      )
    }
  ), 
)

3 replies

March 3, 2023

No, unfortunately till the current Appian version we don't have that option to section header based on collapse logic(Inbuilt section layout collapse). the only option you have use Rich text displays fields option.

man0001Author
March 3, 2023

Thanks for the quick response.  Hope, someone at Appian adds it to their backlog of features to implement.

March 3, 2023

That is only likely to happen if you submit a support ticket for the desired functionality so it gets to the Product team