RichText on Xpages

Following is my situation:

I created an Xpages document which shows entries from a view by using a Repeat. Among the entries I want to show a RichText field which I of course cannot obtain through view entries.

In order to get the RichText on screen I use a RichText control in which I use the following Java script to get the data:

var str:String = rowData.getUniversalID();

var doc:NotesDocument = database.getDocumentByUNID(str);

doc.getItemValue(“field_name”);

I do get the data on screen but starting and ending with a bracket like this > [text]

Using simple data binding it is no problem but not an option for me as I want them shown in a Repeat.

I tried maybe 100 different ways of making this work but I always end up with brackets or plain text (enters etc. not showing).

Best solution I have atm is writing HTML code in the form field and use a computedfield with content-type set as HTML.

Any ideas / suggestions?

Subject: Re. Rich text

Did you try using

doc.getItemValue(“field_name”)[0]

Don’t know if it is the same for rich text fields but getItemValue returns an array for standard notesitems

Andrew

Subject: Topic closed

that did the trick!So close I was trying it with “(0)” lotusscript style but not one moment it occured to me I had to do it formula style.

thanks a lot!