How to create a new comment identifier?

Hey all,

So I’ve been working on creating an identifier in my app that when someone leaves a comment (that’s not the creator) The color of the topic number count for a room will change color indicating that a comment is available in this room. I think I’m good on how to do the conditional for this, where I’m slightly stuck is perhaps how I am structuring the data.

1.) Right now I have a a Data Type called Comments which is where all my comment information is being stored. For this new function, I just created another field type called “Comment Read” with a yes/no.

2.) What would then happen is when someone makes a comment I would trigger this to “No” and then would change the conditional to show my color change that a new comment is available to read.

3.) Then once someone click the Modal where these comments are displayed, it will then switch this to “Yes” indicating that it was read and essentially removing that condition back to its original state.

All of this is working for the most part, but where I’m stuck is… this only happens 1 time. IF another comment is left on this Topic, nothing happens.

Thoughts? Is their a better approach? @gf_wolfer since you’re pretty familiar with my app, maybe you can shine some light?

Thanks!

Dennis

Hi there, are you using in the workflows tab a “Do when condition is true”?
If so, do you have the “run this” option of that workflow set to “Every Time” instead of “just once”?

On the other hand, if it´s not a problem with the settings of a “Do when condition is true”; if you have those comments saved in a list for the user, maybe you´re filtering the first item of that list only; instead what you need to do is use a “Do a search” who finds comments whose receptor is the current user and whose comment Read boolean is stated as “No”.

Hey @jr_veg thanks for the info on the workflow tab. I’ve not set this to Every-Time. I’ll have to look at that. I did have “when condition is true”. Hmm. Also good point on needing to do a search. That in fact could be the case as well. I’ll dig into both. Thanks!

Just to also clarify, I don’t need to have the yes/no comments read field type as a list correct? This is associated to the Comments Data type only.

My guess is the issue is with my search though since when I right my conditional on the styling, I think it’s only pulling first time for the topic. So I need to search that down I believe.

Thanks!

Dennis

Exactly, you don´t need the yes/no field as a list, since it is associated to the comments Data type. :slight_smile:
Let me know if you were able to fix it :slight_smile:

Best!

Rodrigo

Thanks Rodrigo for the help thus far. Appears as though the above’s not working or I’m not making any sense of it ha. I’ll keep playing here and see where I get.

One thing to note, with your current Data setup with a simple yes/no field on a Comment, that if ANY User triggers the field to mark it as read, it will show up as read to ALL Users.

Is the Comment Read feature specifically for the ‘Creator of the Item Commented On’, or is it for any User to know if they have read the comment before or not?

Also - what is the exact Condition you are putting on the Room for the colour to change?

Hey Geoff!

So I’d like this to only be for those who are logged into app, are the owner of the account, room are a member of that room. So only they would see that a new comment is available with that conditional. The public view would not have this indicator. This indicator would only be triggered by those who are sending this comment (public room) or not the creator of that comment in the app.

I’ll also be doing something similar to this when I get the Topic’s queue functionality more integrated.

Here’s the conditional I currently have for the Room Side-bar. This would display on the Topic Count number since I’m essentially indicating that 1 of the topics in this room has a comment.

The user would then “enter that room” and see the list of topics and the Topic that has a comment will have a conditional on the title that changes the comment icon to green:

Once a user opens that “modal/popup” that has the comments the workflow would change that comment read to yes. This is that workflow:

Also, if helpful for you and Rodrigo here’s the workflow on the Comment Submit Button

I currently don’t have anything “limiting” this down to the criterial I explained in the first paragraph. At this point, I’m just trying to get it to do what it needs to do, without any limitation of those who are not logged in, etc.

Thanks guys!

Dennis

Any aditional thoughts after seeing the screenshots above @gf_wolfer or @jr_veg thanks!

Any thoughts? @gf_wolfer

I may be making the wrong assumptions about your end goal, but in my experience I’ve done the following to track user interactions:

On your Topic_Comment thing, add a List of Users called People_who_have_seen_this (for instance). Whenever an admin views the comment/room, add the Current User to that list (or multiple lists of all new comments, which may require running an API workflow on a list of things) to denote that person has visited the room/seen the comment. When a new comment is posted, the list will be empty by default. You can then do a search for all Topic_Comments in that room which do not contain the Current User in the list of People_who_have_seen_this for the new comments. This can also result in a :count to return number of comments this Current User has not yet read, as well as timestamps based on the earliest Comment not yet read.

Similar to what philip said, you need to save a List of Users to a Topic. If I am a User on that List it means that I have read it, if not on that list then I have not read it before.

The Trigger to add me to list could be a ‘Seen’ button that gets pressed, or when I visit the page with the Comment, On Page Load, make changes to a list of comments’s List of Seen By Users and Add Current User

Tough to get too specific without jumping into the app itself

Thanks @gf_wolfer I’ll look through the above again and give it another shot. It’s possible I’ve forgot to add that status to the “user”. It’s always the small things that get me. ha. I’ll nudge you if I need you to jump in.

Thanks!

Dennis

Here’s an update @gf_wolfer so what i’ve done is removed the yes/no comment read field type and limited this down to just your suggestion. All is working however, I think there’s another element that needs to happen in order for this to work for multiple comments on a topic. So essentially right now we are saying “If a comment is read on this comment ad it to the list” however what about future comments on that topic? Make sense? Is their a way to be unique to the exact comment?

Dennis

I would used Philips advice here.

If Topic’s Comment’s Seen By (filtered by ‘list doesn’t contain current user’):count is greater than 1
That means there is a comment in there that the user has not seen and you can use this to count # of comments unread, etc. as Philip mentioned

Thanks @gf_wolfer I totally missed the note that @philip left! I’ll give it a shot! Thanks guys!

This topic was automatically closed after 70 days. New replies are no longer allowed.