Does anybody know a way to convert an HTML text to plain text in a workflow? I tried using wildcards, but so far no success.

To better explain: I have an html text in a column and I want to have a plain text version in another column.

  • What WF technology are you using, 2010 or 2013? SharePoint Designer or Visual Studio? Dec 11 '14 at 12:32
  • SP 2013 + SPD 2013
    – Marpio
    Dec 11 '14 at 12:33
  • SP 2013 supports both WF 2010 and WF 2013. So, I suppose you're using WF 2013 (Workflow Manager)? Dec 11 '14 at 12:34
  • Yes, I'm using the 2013 WF version
    – Marpio
    Dec 11 '14 at 12:50

It cannot be done in workflow alone AFAIK since WF 2013 doesn't allow you to have custom code in it. Actually, this is not entirely true because you can create custom activities, but this is not preferred way.

You should create web service which implements the conversion (https://stackoverflow.com/questions/286813/how-do-you-convert-html-to-plain-text) and consume the service from the workflow.

  • I was thinking about using the string replacement with something like replace <*> with "" regular expression, but it seems it is not possible... :(
    – Marpio
    Dec 11 '14 at 13:23
  • I will check instead to do it through a calculated column
    – Marpio
    Dec 11 '14 at 13:28
  • I don't think that's possible. This would mean that there is an Excel formula which does the conversion. Dec 11 '14 at 13:35

I think I found the solution: I have been just created a calculated column where I have copied the HTML column content. If I will need the text value in a more flexible column (calculated columns are not really so!), I can use a WF to copy it.

  • Have you tried that? Dec 11 '14 at 13:43
  • Yes, but I have the impression that also clean is useless: it is enough to copy the text in a calculated column and it turns plain... still checking...
    – Marpio
    Dec 11 '14 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.