I think it’s worth noting that this feature is in preview, and is being updated occasionally. When I did the first review, the items under “Content” were both write and read. Now, we have “Display” for display/read and “Additional Columns” for write.
Save comment field: This is where the text that the user types into the comment entry box, is written.
Display: these are the columns that are used to display the comment. They can be lookups or templates or simple text columns.
Additional Columns fields: these are things besides the comment body, that are saved. Before writes were tied into the “Content” section, so these weren’t necessary. But no we have more control with the separation of write and display. That also means a few extra steps that may not be obvious. You need to use a column here for example, to write the current datetime into a datetime column. You also need to write the author (name and photo, or author ID and then have name and photo displayed from a lookup.)
After submit action: Not necessary for basic function of comment component, but you can use this to tack on any additional action (such as a push notification.)
Didn’t quite finish setting up and explaining everything in this video, but was able to get it nearly set up in the 5 min I have in my free Loom account.
Hi @MatthewS this solution is neat. Are you able to share more on how you were able to nest comments and group them together using this work around? Appreciate any insights.
A different action is used to reply, an action coming from a click action on one of the comments. This action marks the comment as a reply as well as the comment it’s replying to.
Then you need to display the comment differently when it’s a reply. In mine I used a template column and and if-then-else column. The template adds the header line to the comment “Replying to ____”, and the ITE column is what’s displayed for the comment body (description), displaying the as typed comment for first level comments, and the reply template for replies.
The trickiest part was getting the order right. You can’t order by posted time because then the reply wouldn’t be nested. Instead I used a computed math column. Off hand I don’t remember exactly what I did but it was something like:
For original comments, take the original posted datetime and multiply it by a few orders of magnitude.
For replies, use the number above from top level comment, and then add the datetime (but this one without multiplying by orders of magnitude.)
Sort by that column, and then you have the order of the top level comments coming first, and the reply comments nested beneath.
Thanks a bunch for the prompt response! This was super helpful for me - and I’m sure others will appreciate the insight on threaded comments. I tried using a math column to input an exponential formula (x^n and x*10) but didn’t seem to find any luck with ordering the replies in each nest in this regard. Any assistance or suggestions concerning how you used the Math column to achieve this would be highly appreciated.
More recently than making these nested comments, I was creating a tutorial for fancy sorting configurations within a single list (I’ll share that here when I get around to finishing it.) And in some of those examples, I used that kind of logic of multiplying some data to sort by a large number, and others not, depending on how I wanted to group it. For example, list all bottles of OJ and milk in your fridge by expiration, but have all OJ be above all Milk. To do that, multiply OJ expiration date by 1000, and don’t multiply milk expiration by anything, and sort by that.
Anyway, for these comments, I looked back at my data and I did something different. I numbered the comments. When writing a new comment, it looks up the highest comment number on that thread, and writes the new comment’s number to be one higher.
If it’s a reply, it also writes the comment number that it’s replying to (or the top level comment if replying to a reply.) And a math column adds that number to a 10 thousandth of their comment number.