Dears ,
I need to save list of all comments added during all steps of LF Form.
I need to add them to a multi value field in LF Repository in format like this:
User1+ (2/22/2019 11:14:05 AM) + comment
User2+ (2/27/2019 2:39:26 PM) + comment
.......
Dears ,
I need to save list of all comments added during all steps of LF Form.
I need to add them to a multi value field in LF Repository in format like this:
User1+ (2/22/2019 11:14:05 AM) + comment
User2+ (2/27/2019 2:39:26 PM) + comment
.......
Dears,
I made it with these steps:
Retrieving values from Retrieve Business Process Variables:
Then I used this SDK script to build comments field values:
protected override void Execute()
{
// Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session
var CommentsAll=GetTokenValue("CommentsAll");
var CommentsTime=GetTokenValue("CommentsTimeAll");
var ActionsSubmissionAll=GetTokenValue("ActionsSubmissionAll");
List<string> CommentsList=new List<string>();
try
{
List<object> CommentsAllList = ((IEnumerable)CommentsAll).Cast<object>().ToList();
List<object> CommentsTimeAllList = ((IEnumerable)CommentsTime).Cast<object>().ToList();
List<object> ActionsSubmissionList = ((IEnumerable)ActionsSubmissionAll).Cast<object>().ToList();
for (int i = 0; i < CommentsAllList.Count; i++)
{
try{
CommentsList.Add(ActionsSubmissionList[i]+"("+CommentsTimeAllList[i].ToString()+")"+"- "+ CommentsAllList[i]);
}
catch(Exception ex1)
{
}
}
}
catch(Exception ex)
{
SetToken("Exception", ex.Message);
}
SetToken("CommentsList",CommentsList);
}
}
Then I used "CommentsList" to assign value.
Thanks.
I used Javascript to disable the default comment box for the user task.
I added my own multi-line field for comment entry.
Pros: No need to involve LF Workflow or SDK. Good for simple Forms processes.
Cons: Since I omitted the comment box, no comments will show in the right panel, when an approver access the form.
Thank you for your update , good solution.
But did you checked it with the Laserfiche App?
Yes. The comments persist throughout the multiple approval processes and into the repository without any code.
Here is my javascript code: .comment-section{display:none;}