@Amik - I solved a similar issue when creating an IM chat feature in an app using collections. This should work for what you need.
On your gallery "On Select" property, use the below code to create a collection of the existing comments. The error loop will handle any scenarios where no comments currently exist;
Clear(communication);
IfError(
If(
!IsBlank(
LookUp(
'Your Database',
ID= Gallery3_9.Selected.ID, ---> change to your gallery name
'Your comments column name'
)
),
ClearCollect(
communication,
Split(
LookUp(
'Your database',
ID= Gallery3_9.Selected.ID, ---> change to your gallery name
'Your comments column'
),
Char(10)
)
)
),
"");
If you are using the "SubmitForm" function to submit all of your data on the form together, delete the "Update" property of the "Comments" data card as the below "patch" code will update this card for you.
In this case, our submission buttons "On Select" property would be the below code followed by "SubmitForm(FormName);"
If you are only submitting your comments data, do the above but without the "SubmitForm" code by just adding the below code to your button,
Clear(communication);
IfError(
If(
!IsBlank(
LookUp(
'Your Database',
ID= Gallery3_9.Selected.ID, ---> change to your gallery name
'Your comments column name'
)
),
ClearCollect(
communication,
Split(
LookUp(
'Your database',
ID= Gallery3_9.Selected.ID, ---> change to your gallery name
'Your comments column'
),
Char(10)
)
)
),
"");
Patch(
'Issue tracker',
{ID: Gallery3_9.Selected.ID}, --> chnage to your gallery name
{
'Your column name': Concatenate(
Concat(
communication,
Value,
Char(10)
),
If(
!IsEmpty(communication),
Char(10)
),
Concatenate(
Text(
Now(),
"[$-nl-NL]dd-mm-yyyy HH:mm:ss;"
),
" - ",
User().FullName,
" - ",
'Text box name where comments will be added'
)
)
}
);
Reset('Text box name where comments will be added');
You will notice on the submit button, prior to our "Patch" we repeat the same code that is in our gallery "On Select" property. This is to reload the collection with new comments without risk of losing data. This code on the gallery ensures that when you choose a new gallery item, the data from your previous selection is removed.
Your end result will look something like the below;

This will allow you to type the comments you want to add and the code will format all of the date and name for you
I hope this helps, please mark your question as solved and if you like my response please give it thumbs up!