XPage: What's the correct syntax to generate a view column value in html?

I’m using a view control on my xpage and need to display one column of the view with indents. This is what I have for my view column formula:

spaces:="      &nbsp";

“[”+@Repeat(spaces;indent)+Name+“]”

where indent is a computed number and Name is a fieldname.

I set my column in my xpage view control to “Display column values” in HTML, but all I get is the string just as computed in the view. What am I missing?

tia

Bob

Subject: Do you have escape=“false” set?..

Subject: No, I’m not…

I’m setting the html string in my view column formula and then simply checking the column display box for html. Where should I put escape=false?

Subject: Start with a Tag

Just setting the Content type: HTML works for me, no messing around with escapes.

I have a vague recollection that you need to start the value in the View Column with an HTML Tag.

e.g. spaces:="      &nbsp";

+@Repeat(spaces;indent)+Name+“”.

Good luck. Jerry.

Subject: I’d go with JP…

  • I don’t actually use View Controls … too restrictive … but I continually have to put escape=“true” in places I wouldn’t expect to, like script blocks. So I tossed that out. JP has actually done this, so that suggestion will bear fruit much quicker…

Subject: Ok, got it to work, but…

…only if I don’t have the checkbox checked for ‘show values in the column as links’.

My column formula in the view now looks like this:

indent:=@If(OutlineLevel=“”;@Elements(@Explode(WBS;“.”)) - 1;OutlineLevel - 1);

spaces:="      &nbsp";

” + @Repeat(spaces;indent) + Name

(note, no square brackets)

Since I couldn’t use the ‘link’ checkbox, I added an onclick event for the view column and then opened the doc page by using a simple action and this formula to get the doc unid:

var doc:notesDocument = viewrec.getDocument();

doc.getUniversalID()

THANK YOU!