Hi,
I have question on combining comments.
Scenario:
I have a section in UI where comments will be added and when clicks on submit, it runs a Process model and stores the comments in a CDT Field called Comments.
Here is the missing logic, when the Main process model runs and it runs a sub process model where we are inserting some more comments using a script task to store the comments in Comments field in the same CDT.
In the sub process instance, the CDT has both comments from UI and the comments which was assigned through script task, when we saw the instance of the Main process model, the CDT is populating only the comments which was from UI.
Looking for: can you help me for any logic or solution we can display both comments in the CDT of main process model?
Thanks in advance
Discussion posts and replies are publicly visible
So your comments will be multiple,better to take one more cdt for comments(foreign key : main cdt primary key), when ever your inserting comments save in comments cdt .
when ever you want to show comments for a particular record ,hit comments table with that record primary key (which is fk in comments table ) .
Thanks Chaitanya for your reply,
But we have to make an entry in the same CDT and Table, is there any function can we append both comments or any logic.
Thanks
Yes we can,so take two local variables one is fro old comments ,another for new comments
1) when ever your are loading a form ,in old comments local variable get that value .
2) save new comments in new comment local variable
3) when ever you are submitting the form in save into of button save both values like
a!save( ri!cdt.comment, concat( local!oldComment, ",", local!newComment ) )
Thanks it may be helpful, let me try