Skip to main content
Nintex Community Menu Bar

How to check for multiline text duplication

  • February 21, 2020
  • 3 replies
  • 28 views

Forum|alt.badge.img+8

Hello All,

 

I have a list that has a 2 multi-line text fields (Notes and All comments).

 

A workflow runs on the Notes field (entry by user) and date/time/user stamps the comment and appends it to All Comments field.

 

Is there a way to check the All Comments field for the Note entered by the user to see if that Note has already been entered (so that the same "Note" doesn't end up diplicating - with a different date/time)?

 

EX: User 1 enters: "This is great" in the Notes field. The workflow copies the Note, stamps it updates the All comments field = "User 1; 2/20/20 8:55 PM: This is great." and deletes/empties the Notes field.

 

User 1 comes back later and enters "This is great" in the Notes field.

 

I dont want the All Comments field to read:

"User 1; 2/20/20 10:00 PM: This is great."

"User 1; 2/20/20 8:55 PM: This is great."

 

I just want to delete the 10:00 PM entry from the notes field since that was previously capture.

 

Thanks in advance!

3 replies

Michel
Nintex Partner
Forum|alt.badge.img+7
  • Nintex Partner
  • February 27, 2020

Hi Nates,

You need to split the 'All comments' field with a Regular Expression action, Pattern - {Common:NewLine}, and then, per line, check if the Comment and the name of the user exists. If  a match is found, simply do not update the 'All comments' value. 

Good luck! :)


Forum|alt.badge.img+12
  • Scholar
  • February 27, 2020

@Nates_Mom ......I'm not sure if it will be reliable or not !!!!

 

Since this is a multi-line text which means value in this column depends on the user, e.g.

 

  • [This is great]
  • [This is great.]
  • [This is great ]
  • [That's great]

 

Above is just an example of same information which could be entered differently. Message is same (you can ignore the [], just want to show the blank space) but technically they are not exactly same.

 

Unless you're controlling what user can enter as a comment, I won't recommend this approach.


Forum|alt.badge.img+8
  • Author
  • February 28, 2020

@kunalpatel The user can type whatever they want.