It's all about the answers!

Ask a question

Add new line into Wiki attribute progmatically via followup operation.

Abhishek Kumar (49420) | asked Mar 17 '16, 6:51 a.m.

I have a requirement that i have to set the wiki attribute  in a formatted way!
 i am trying to enter a new line progmatically but i am unable to do so, the code is as  follows:

String value = "hello setting new line value" + " " & nbsp;" + " checking if new line added;
currentWorkitemWC.setValue(wiki, value);

but this code is unable to enter the new line in the wiki attribute. Any help as to how to set String data in the wiki attribute with line break ?

Thanks in Advance

Accepted answer

permanent link
Ralph Schoon (62.3k33643) | answered Mar 17 '16, 6:59 a.m.
edited Mar 17 '16, 8:08 a.m.
According to // would force a line break

I remember having played around with it when I created the work item commandline. I think the syntax that worked for me was:

It is always a good idea to download the code from the work item commandline and have a look if you struggle. There might be solutions in there.
Abhishek Kumar selected this answer as the correct answer

Your answer

Register or to post your answer.