Skip to main content
faraza4154
Known Participant
Dec 19, 2022 8:58 AM UTC
Question

Nested Bulleted List

How can I create the nested bulleted list in Appian 

3 replies

harshitb6843
Brainy
Dec 19, 2022 10:47 AM UTC

If it is to be created by the user, then using the richTextField or if it is to be done programmatically, then you have to use a combination of a!forEach() along with a!richTextDisplayFIeld() and add extra spaces on the left to make it look like it is the child of its parent (indentation) 

mikes0011
Brainy
Dec 19, 2022 7:28 PM UTC
add extra spaces on the left to make it look like it is the child

nooooooooooo

The Expression Guru
stewart.burchell
Employee
Dec 19, 2022 11:47 AM UTC

The a!richTextBulletedList() can take an additional attribute of 'nestedList' which will automatically indent the list that you pass to it. For example:

a!forEach(
    items: fn!enumerate(5) + 1,
    expression: a!richTextDisplayField(
      value: a!richTextBulletedList(
        items: {
          a!richTextListItem(
            text: fv!item,
            nestedList: a!richTextBulletedList(
              items: a!forEach(
                items: fn!enumerate(3) + 1,
                expression: a!richTextListItem(text: fv!item)
              )
            )
          )
        }
      )
    )
  )

results in: