Copy enhanced rich text field from one item to another

  • 26 March 2018
  • 3 replies
  • 19 views

Badge +1

Hi,

I'm trying to copy the value of an enhanced rich text field / from one item to another while preserving the formatting. Until now I'm only able to copy either the plain text or the html.

I have to list ListA and ListB each using a content type TypeA and TypeB. Both content types derive from Document Set and share an ehanced rich text site column FieldX. TypeB derives from Document Set. A workflow running on ListA creates a new item of TypeB in ListB. Inside this action the value of FieldX ist copy from the source item to the target item. The workflow finishes correctly. But, when viewing the newly created list item in ListB the former rich text is displayed as HTML.

Enhanced rich text gets displayed as HTML

The configuration of the "Create Item" action is as follows:

What am I doing wrong here?

Ben


3 replies

Badge +11

Hi Ben,

which actions are you using for creating the item? Can you please show us the configuration of that action?

I tried "Create item" action and it worked without problems. I didn't use content types but that shouldn't matter.

214032_pastedImage_2.png

As you can see I am inserting a reference to the enhanced rich text field directly and the formatting remains in the new item:

214031_pastedImage_3.png

Cheers

Philipp

Badge +1

Hi Philipp,

you pointed me in the right direction. I tried all configurations of the workflow starting from the most simple one, as you built it (Two lists, no content type, just same site column). Then I switch to using content types deriving fom "Item" which also worked pretty well. But when trying to derive the content types from "Document Set" things started to break. So I found that I did not properly state my configuration. Only TypeB derives from "Document Set" and TypeA derives from "Item". (See edit of initial post).

Document Sets (and derived content types) can only be used in document libraries. But document libraries do not allow using (enhanced) rich text. Multiline field cannot use formating here. So the workflow correctly copied the HTML of the source field, but the target library was not able to make proper use of it.

Thanks again

Ben

Badge +11

Hi Benjamin,

good finding! And thanks alot for giving us an update on the solution of your issue.

Cheers

Philipp

Reply