Create a nested list to display

Certified Senior Developer

How can we create a rich text display menu as showing in the attached format having sub list too.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    {
      a!richTextDisplayField(
        labelPosition: "COLLAPSED",
        value: {
          a!richTextBulletedList(
            items: {
              "Item 1",
              a!richTextListItem(
                text: "Item 2",
                nestedList: a!richTextBulletedList(
                  items: {"a", "b"}
                )
              ),
              a!richTextListItem(
                text: "Item 3",
                nestedList: a!richTextBulletedList(
                  items: {"c", "d"}
                )
              ),
              "Item 4"
            }
          )
        }
      )
    }

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Hi  

    thanks so much. very close to my AC but my requirement for this code is under a foreach loop.

    So i shared the updated code provided by you as per my secnario & what error i got while implementing the same.

    {
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    a!richTextBulletedList(
    items: a!forEach(
    items: {
    "Item1",
    a!richTextListItem(
    text: "item2",
    nestedList: a!richTextBulletedList(items: { "a", "b" })
    ),
    a!richTextListItem(
    text: "Item 3",
    nestedList: a!richTextBulletedList(items: { "c", "d" })
    ),
    "Item 4"
    },
    expression: a!richTextItem(text: fv!item)
    )
    )
    }
    )
    }

  • +1
    Certified Associate Developer
    in reply to om786

     Hi  

    Please Use the below code which is matching your scenario

    {
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    a!richTextBulletedList(
    items: a!forEach(
    items: {
    "Item1",
    a!richTextListItem(
    text: "item2",
    nestedList: a!richTextBulletedList(items: { "a", "b" })
    ),
    a!richTextListItem(
    text: "Item 3",
    nestedList: a!richTextBulletedList(items: { "c", "d" })
    ),
    "Item 4"
    },
    expression: fv!item
    )
    )
    }
    )
    }

  • 0
    Certified Associate Developer
    in reply to om786

    Hi  , in your code under expression you have passed richtextItem istead, try passing fv!item so that the error will be resolved and try to use this code to get the required output.

Reply Children
No Data