Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

If save in a variable and display it in the report, the data looses formatting

Hello!

I'm trying to build a report using next schema:

https://<SERVER_URI>/rm/publish/views?metadata=schema

When I iterate fields in some view, it displays correctly formatted data with <div> element of schema in "Text" element of RPE. But if I will save <div> in JavaScript variable first (for example, trying to save artifact names in an array), and next if I display it in "Text" element, then it will show the artifact's data without any formatting.
I can not understand why the formatting is lost if I use a JavaScript variable to save it.
On the next screenshot, there's part 1 that directly displays <div> elements, and section 2 that displays the same data but preliminary saved in an array:

Some explanation

Could please somebody explain why the formatting is lost in this way?
Thank you very much for help!

0 votes


Accepted answer

Permanent link
Dimitry,

When you assign value to text or to variable please check if you have both value selected for XHTML Input and XHTML Output.

If none of them is selected You will get plain text without any html tags.

I do not have access to my RPE instance to provide screenshots but following post should be helpful.


Hope it will help You.
Dmitry A. Lesin selected this answer as the correct answer

2 votes

Comments

Hi Bartosz,

Thank you very much! It actually works. If more detailed, then we need to set XHTML input when saving the data into a variable:

Set XHTML input first

And when we print the value in variable, we need to set XHTML output:

Set XHTML output

In this way, the resulted content will be formatted:

Formatted result

Many thanks!!!

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 332

Question asked: Dec 26 '19, 2:09 p.m.

Question was seen: 1,339 times

Last updated: Jan 07 '20, 6:46 a.m.

Confirmation Cancel Confirm