You are viewing limited content. For full access, please sign in.

Question

Question

Need a workaround the update word document and brake line issue

asked on July 25, 2017

This is my case:

 

1.- Populate a form 

2.- bp triggers a wf with all the info from the form to populate a word document (by update word)

3.- but turns out that in a description field, when try to paste to word the info, crash because the instruction don't support brake lines.

 

My huge issue is this: the workflow crash and in that instan forms send the instrucction again and again making hundred of workflows in a minute, and so on.

 

I try to use a token editor with trim to remove the brake lines but doesnt work.

 

Any ideas....

0 0

Answer

SELECTED ANSWER
replied on July 25, 2017

The scenario is that a user fills out a form which has a multi-line field. Upon submission, a workflow is started where it takes the data from the form's multi-line field and is used in an "Update Word Document" activity as part of a find and replace process.

When the form field data contains line breaks, this causes an error to occur in the "Update Word Document" activity. The error message states "The replace string cannot contain special or break characters." Please note that this is by design.

This causes the workflow instance to terminate and the Forms instance will become suspended (if it was set to wait for the workflow to complete before resuming).

If you want to take the multi-line data from the form submission (including line breaks) and apply that to a Word document using Workflow, then please do the following:

  1. The Word document should use actual fields like {{Descripcion}} instead of [Descripcion]. This will allow you to use the "simple field merge" update type rather than the "find replace" update type.
  2. Modify the "Update Word Document" activity to use the "simple field merge" type. When you "import field names from document" it should be able to find your fields and then you can just apply the multi-line form field token to it directly.

Full disclosure: Miruna provided this information which we confirmed to work with the document you provided in the support case.

1 0

Replies

replied on July 25, 2017

Hi Gerardo.

For your problem with the brake line maybe you can use something like this before use the update word node , using custom query node then retrieve the result on the update word node :

 

DECLARE @String as nvarchar (50) = 
'Forms and 
Workflow'

SELECT REPLACE (REPLACE (@String,CHAR(13),'' ),CHAR(10),'')as String

Regards!

0 0
replied on July 25, 2017

That works for now, im just going to define what can i put instead of the brake line.

Thanks David

Regards

0 0
replied on July 25, 2017

You might want to open a support case for the Workflow crash. Update Word Document seems to work fine for me with values containing line breaks.

0 0
replied on July 25, 2017

Hi Miruna

What version of Workflow  and Forms you are using?

Because i already got issues with the last Forms, like nobody test it before the launch kind of issues.

0 0
SELECTED ANSWER
replied on July 25, 2017

The scenario is that a user fills out a form which has a multi-line field. Upon submission, a workflow is started where it takes the data from the form's multi-line field and is used in an "Update Word Document" activity as part of a find and replace process.

When the form field data contains line breaks, this causes an error to occur in the "Update Word Document" activity. The error message states "The replace string cannot contain special or break characters." Please note that this is by design.

This causes the workflow instance to terminate and the Forms instance will become suspended (if it was set to wait for the workflow to complete before resuming).

If you want to take the multi-line data from the form submission (including line breaks) and apply that to a Word document using Workflow, then please do the following:

  1. The Word document should use actual fields like {{Descripcion}} instead of [Descripcion]. This will allow you to use the "simple field merge" update type rather than the "find replace" update type.
  2. Modify the "Update Word Document" activity to use the "simple field merge" type. When you "import field names from document" it should be able to find your fields and then you can just apply the multi-line form field token to it directly.

Full disclosure: Miruna provided this information which we confirmed to work with the document you provided in the support case.

1 0
replied on July 26, 2017

I make a test with this option al looks like it work.

Thanks Alex

Now I just need to fix the part of Forms send the instrucction again and again making hundred of workflows in a minute, and so on.

The latest version of Forms 10.2.1.205 do nothing about it.

0 0
replied on July 26, 2017

Turning off the Forms retry behavior is addressed in this other thread.

0 0
replied on July 26, 2017 Show version history

Wait

 

The {{descripcion}} now goes without the correct format. The replace its for example "description" (this is what i want) and de merge is "description" and with other type of letter.

0 0
replied on July 26, 2017

If you mean it's no longer bolded, then that's Word formatting and has nothing to do with Workflow. Make sure you still have it formatted as bold in the Word template you use in Workflow.

results in

0 0
replied on July 26, 2017

I didn't change a thing but now seems to work fine.

OK

Thanks Miruna.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.