Eliminate text in body of email when using Lazy Approval


Badge +4

When a person replies using the Lazy Approval method, the body of the email gets stored in the Approver Comments in the Workflow Tasks. 

We use this to reference the comments of the approvers during our 16 approvers process. 

Is there a way to eliminate the entire body of the email that gets stored into the Approver Comments field??
(the top 2 Lazy Approval reply lines would be sufficient)


7 replies

Userlevel 6
Badge +16

When you are using lazy approval a string like this >>> [#HDLSIEIFJSKEID#] is used to identify a task. You cannot eliminate it.

If you want a Approver Comments without that string you can use the replace function and a regular expression to eliminate it.

Take a look at >>> How to strip Approver Comment in Nintex Workflow? | SharePoint Rider

How do I clean up the approver comments to only show text value?

Badge +4

Thanks for your reply.  I have used the RegEx Action to extract the content and eliminate the email body content.  I now have this nicely scrubbed data variable, but it appears that I cannot update the ApprovalComment field in the Workflow Tasks lists.  Is there a way around that?

Badge +6

Hi Kathy,

The approach I have taken in the past is to build up my own Approval Comment variable and populate it into a column as I go with the appropriate data. While it is more work, you have complete control over the format and content of the field and to be truthful, probably arrived at the conclusion that I could not change the inbuilt field. This is probably by design though, as an auditing type requirement.

Regards,

Mark

Badge +4

Mark,

Thanks for the information.  I think I will take that route.  Since I have already scrubbed the LazyApproval response data, I can take the field off from the WF Task List and update my own approver comment field.

Thanks.

Badge +4

Criss,

The actual RegEx is quite simple; I use a Regular expression action, ignoring the case, with a pattern of:  ^.* .*

I then store the results in a collection, us the Collection operation action to Get the scrubbed comment and update the record.

I only do this in one scenario on my entire farm but have used it for over a year without any issues.

Hope that helps.

Badge +4

Just add to the rear of the expression another: 

Sorry, I'm really swamped with work but try the RegEx site below, I believe it will really help you sample and test expressions:

h t t p : / / r e g e x r . c o m

RegExr: Learn, Build, & Test RegEx

Best Wishes

Badge +4

Glad to hear of your progress!

Reply