cancel
Showing results for 
Search instead for 
Did you mean: 
mai-kel
Nintex Newbie

I want to have a break!

Hi community,

I have multiple line string with content

blablabla---blablabla---blablabla

I want to convert this string that it looks like this:

blablabla

blablabla

blablabla

Can I use the replace string object for this? Or should I use regular expression?

What is the "new line command"? I already tried "\n" and "<br>"

I am working with NINTEX on

Cheers

mai-kel

0 Kudos
Reply
12 Replies
Automation Master
Automation Master

Re: I want to have a break!

Please check out Vadim Tabakman‌ blog post on using using the Regular Expression Action.

regular expressions in nintex workflow

Basically what you will need to do is do a SPLIT on the --- using the Regular Expression Action and then save your results into a Collection Variable, then Loop through your collection to do something or use the collection actions to get a certain index at a certain time. Let us know if you need more help with this.

Reply
mai-kel
Nintex Newbie

Re: I want to have a break!

I had seen the post from Vadim Tabakman‌, but unfortunately it doesn't work here.

I have a comment (within task list in column "Comment") like

YO

YO

YO

I did a query list and wrote the content into a collection variable.

Result:

colApproverComments: [{"OData__Comments":"YO\u000d\u000aYO\u000d\u000aYO"}]

First I tried this:

Result:

colApproverComments: ["[{\"OData__Comments\":\"YO\\u000d\\u000aYO\\u000d\\u000aYO\"}]"]

I also tried this:

Result:

txtKommentar: [{"OData__Comments":"YO\u000d\u000aYO\u000d\u000aYO"}]

So neither split nor replace gave me the desired result.

0 Kudos
Reply
lakshminarayana
Nintex Newbie

Re: I want to have a break!

Hi Michael Weiß‌,

Can you use 'Regular Expression' action and in the replace text use 'Enter' from keyboard.

Result:

It worked in SharePoint 2013, try it in Office 365.

Thanks,

0 Kudos
Reply
mai-kel
Nintex Newbie

Re: I want to have a break!

Hi ,

Yeah, that works with NINTEX onpremise, but unfortunately not with O365 (that was my second try as described above).

Cheers

mai-kel

0 Kudos
Reply
lakshminarayana
Nintex Newbie

Re: I want to have a break!

Hi ‌,

You can use 'single line of text' workflow variable instead 'Collection' variable to store comments..did you try that?

If you want only comments from last approver then you can use 'Approver Comments' from insert reference.

Thanks,

Reply
mai-kel
Nintex Newbie

Re: I want to have a break!

Aaaaaahhhhh.....!

This makes things so much easier - I used a set variable instead of a query list action to retrieve the data.

With that the comment is directly written into a text variable and not into a collection. Within the text variable the format is automatically correct.

Thanks mate!

Cheers

mai-kel

PS: I cannot mark your answer as correct because the question itself is still not answered. But I do not have a problem anymore!  

0 Kudos
Reply
courtney_shelto
Nintex Newbie

Re: I want to have a break!

I have been able to add line breaks to a string variable using <br/>. I use the "build string" action.

Reply
mai-kel
Nintex Newbie

Re: I want to have a break!

Unfortunately <br> as well as \n didn't work.

0 Kudos
Reply
courtney_shelto
Nintex Newbie

Re: I want to have a break!

Did you put the slash though? <br/>?

0 Kudos
Reply