I have been requested to create a list for tracking items, where if a user adds comments to an item it will update another column status (in this case it will be a "Comment_Status") to state there's a new or edited comment.
I think the best way to accomplish this is using a workflow, but i'm not sure where to start with it. Can someone please advise?
Solved! Go to Solution.
Yes we can accomplish the above requirement by creating a workflow.
As per your requirement we have a comments column (multi line of text) , comments_Status column (Single line of text, value of this will update from workflow) , please create a another column Comments_IsNew (choice column, make default value as 'Yes', this acts as a flag in our workflow which carries 'Yes' or 'No' value).
In the workflow (make the workflow runs at item creates and updates), then make a logic.
The first for loop will check whether Comments are not null and Comments_IsNew value as Yes.
Then update the Comment_Status value as New.
In Second For loop we will check whether the Comments are not null and Comments_IsNew value as No.
Then update the Comment_Status value as Edited.
Finally we have update a Comments_IsNew as No.
The logic is straight forward, if the comments are entered by the user for the first time it goes to the first for loop because the comments are not null and Comments_IsNew as Yes, at the end of the workflow we are updating Comments_IsNew as No.
If the comments are updated by the user, then it goes to the second for loop because the comments are not null and Comments_IsNew as No.
Please let me know if you find any issues, make it as a answer if this logic works for you.
Thank you so much for this example, i was able to test it out and it works. What if I have a already have a comment, and want to change the status if the comment was edited to Comment_Edited?
Simple you can manually start the workflow for the item that the comments are available.
If you are satisfied with the solution that I have provided. Please make it as answer.