cancel
Showing results for 
Search instead for 
Did you mean: 
MSargentini
Nintex Newbie

Remove approver comments

Dear,

I want to do the following:

Once approver filled in some comments I want to filter/extract only the real comment instead of the (approver name) / date  etc.

 

ApproverName (Approved) 15/10/2015 07:54 - 15/10/2015 07:54 (ApproverName) real comment

 

I did try to use the regular expresssion with the following patern: ([\w\s,]+) \([\w\s]+\) (?:[\d:.\/\s\w\-]+) \([\w\s,]+\) (?<Comment>.*) and replacement text will be ${Comment}

When I run test this expression via 'Run Now' I do see the result I want in the Result box (see screenshot)

I am using Nintex Workflow 2013 version 3.1.4.0 - English

 

Thanks for you help!

Labels: (1)
0 Kudos
Reply
30 Replies
Not applicable

Re: Remove approver comments

Hi,

You can't remove comments because if this field as i saw from your example is multi line text field wit functionality to append text to field. For this functionality SharePoint asks you to turn on version tracking on a list it means that all that field appended values are actually versions which you cant remove.

0 Kudos
Reply
Not applicable

Re: Remove approver comments

0 Kudos
Reply
MSargentini
Nintex Newbie

Re: Remove approver comments

That's what I did, unfortunately it's still not working

Running it within the regular expression it's working, like in the screenshot I attached to the original question.

When running the whole workflow it's not working :-(

0 Kudos
Reply
Not applicable

Re: Remove approver comments

HI Michel Sargentini​,

Using a RegExpression editor online, i have seen that the RegExpression that you used did not work:

RegExr: Learn, Build, & Test RegEx

Using: ([\w\s,]+) \([\w\s]+\) (?:[\d:.\/\s\w\-]+) \([\w\s,]+\) (?<Comment>.*) did not work,

Using the following ([\w\s,]+) \([\w\s]+\) (?:[\d:.\/\s\w\-]+) \([\w\s,]+\)  did work (blue part is selected):

So try and omit the (?<Comment>.*) part.

Note: Sometimes the Regular Expressions that work in the Online editor will not work in Nintex.

Reply
Not applicable

Re: Remove approver comments

To add to the solution above:

When i Run Now your original i get the following:

If you see [Command executed successfully] it usually means that the regular expression is not correct. Or does not retrieve anything.

And without the Comment part

In the workflow History after running both in the workflow:

0 Kudos
Reply
melissac
Nintex Newbie

Re: Remove approver comments

Hi Ramses,

Thanks for posting this! I have a slight different problem and wanted to know what you thought was the best approach.

I have a WF that runs a FlexiTask on create. When an item is created The FlexiTask sends out an email to my department about 20 people, one of those people has to approve the item. I Need to capture the Approver Comments for this task. When I use the Nintex - Approver Comments I get the following:

           Melissa Smith (Approved) 10/23/2015 12:25 PM - 10/23/2015 12:26 PM

          (Melissa Smith) I'll work on this

          Jen Donald (Not Required) 10/23/2015 12:25 PM -

          Paul Smith (Not Required) 10/23/2015 12:25 PM -

          Kate State (Not Required) 10/23/2015 12:25 PM -

I would like to get the following Results:

          Melissa Smith (Approved)  - 10/23/2015 12:26 PM - I'll work on this

I tried to recreate the the line of text using Variables for example: Name (Outcome) Date - Comment. But I can't seem to get the just the comment that was provided. Although I see it in the WF History.

I also tried to Strip out all of the Not Required comments (including name and date).

I would appreciate your thoughts on my this.

Thank you Melissa

0 Kudos
Reply
Not applicable

Re: Remove approver comments

Set a variable with the comment, then put this variable in the 'input text' and then store the result in the same variable.

This will update the variable with the cleaned up comment.

0 Kudos
Reply
melissac
Nintex Newbie

Re: Remove approver comments

Thanks Martin,

I'm a bit confused   Hoping you can shed some light on this. 

Here is what I did -

After the FlexiTask Action

     1. Added a Set Variable Action to Set mtxt_Comment (Variable) to equal Comments (Field name)

     2. A Build String Action in the Text I added the mtxt_Comments (Variable) and I stored those results in mtxt_Comments

But I could not get the results desired. Where did I go wrong?

0 Kudos
Reply
Not applicable

Re: Remove approver comments

The solution we were working on was to remove everything except the real comment.

Because your variable has multiple lines of text you are going to have to use a regular expression (or series of) to remove what you don't want.

You could also try querying the task library for approved items for your specific task.

0 Kudos
Reply