Rich Text Field in Nintex Workflow Cloud Doc Generation showing HTML Code

  • 19 December 2021
  • 6 replies
  • 280 views

Badge +2

Hey!

 

I'm currently working on a NWC Workflow in combination with SharePoint Online, where I want to generate Documents out of the colomns of a SharePoint Online List. Two of these colomns are multi line with Rich Text, which seems to generate some trouble here.

 

I always get HTML tags inside the generated PDF, like <li></li>, <ul></ul> etc. I've done some research, but only found a uservoice where it was stated the problem is already resolved.

 

What am I missing here? And if it is not possible to use rich text fields in DocGen, what are my options to get this formatting right into the document?

 

Thanks and kind regards!

Tim


6 replies

Userlevel 5
Badge +13

Hi @tiwookie,


 


Sorry for the confusion, currently rich text isn't support in NWC Document Generation(https://help.nintex.com/en-US/nwc/Content/Designer/Actions/GenerateDocument.htm). I will follow up and make sure uservoice gets updated. Usually I recommend plain text and using formatting of the tags in Word, if you use rich text you will need to add a regular expression to remove the formatting.

Badge +2

Hey @leighburke!


 


Thanks for your answer!


 


I have to admit, I'm quite disillusioned that rich text isn't a supported scenario. How do we apply formatting without pre-formatting the template? Is rich text support on the roadmap?


 


And regarding the regular expression, I did a few tests with the pattern <(.|
)*?>, but it feels like inside the workflow it isn't in an html format, so nothing changes. (I retrieve an item, store the values in an object, put the rich text field of the object in the apply a regular expression task step) Only after the generation the html code is shown. Do you have an idea what I'm doing wrong? Is there a good example regex for this scenario?


 


Kind regards and hope you are well!

Userlevel 5
Badge +13

@tiwookie In terms of this feature I suggest voting on the uservoice(https://nintex.uservoice.com/forums/430063-5-nintex-workflow-cloud/suggestions/44204823-support-rich-text-in-document-generation-in-nwc). I am not aware of any date for the functionality at this time but it has been raised. 


 


The following is a regular expression pattern that should work <[^>]*>and you should be able to replace it with a blank variable. I recommend doing a log of the html before just to confirm the format.


 


 

Badge +2

Thanks for both suggestions! It worked now.


 


What I'm still wondering: How to apply more complex scenarios? Like formatted Text with bold, italic characters and, in my case, several listing formats. With regEx and NWC it's really a pain to get this working. I ended up using seperate formfields for each bulletin point and get it into the template via repeated sections. Not the best usability for the enduser.


 


I still think I'm missing something here. Formatting Text via Nintex Forms and get it smooth into the generated Document would be such a perfect fit here. I don't get why it's not a covered scenario.

Badge +6

@leighburke , I used this solution and it worked, but it strips out the paragraphs breaks too. How could I keep the breaks? I tried first replacing </p> with a variable set to &#13; but that didn't work, I think I need to escape the paragraph end tag?

Userlevel 1
Badge +4

Here is the correct user voice (Nintex Ideas)

Reply