tag field with a separator

Certified Associate Developer

Hi All,

I have got a small question while using a!tagField. I wanted to add 2 tag items separator with a "/".When I use like below, I am getting an error. I tried using concat, & but both didn't work,

Can someone help here.

a!tagField(
labelPosition: "COLLAPSED",
tags: {
concat(
a!tagItem(
text: "t1",
backgroundColor: "#aaa9ad",
textColor: "#ffffff"
),
& "/"&
a!tagItem(
text: "t2",
backgroundColor: "#990099"
)
)
},
size: "STANDARD"
)

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to hema.mathivathanan

    a!localVariables(
      local!map: {
        a!map(
          text: "T1",
          backgroundColor: "#aaa9ad",
          textColor: "#ffffff"
        ),
        a!map(
          text: "T2",
          backgroundColor: "#990099",
          textColor: "#ffffff"
        )
      },
      a!columnsLayout(
        columns: {
          a!columnLayout(
            width: "NARROW",
            contents: a!sideBySideLayout(
              spacing: "NONE",
              items: {
                a!forEach(
                  items: local!map,
                  expression: {
                    a!sideBySideItem(
                      item: a!tagField(
                        labelPosition: "COLLAPSED",
                        tags: {
                          a!tagItem(
                            text: fv!item.text,
                            backgroundColor: fv!item.backgroundColor,
                            textColor: fv!item.textColor
                          )
                        },
                        size: "STANDARD"
                      )
                    ),
                    a!sideBySideItem(
                      item: a!richTextDisplayField(
                        value: a!richTextItem(text: "/")
                      ),
                      showWhen: not(fv!isLast)
                    )
                  }
                )
              }
            )
          )
        }
      )
    )

    this is the best that I was able to get. Not sure of any other possible way.

Children