haha… then as far as the advanced filtering, i’m not knowledgeable on it. Haven’t had to use it.
So, you want to send a msg to the users the conversation already contains?
Cuz I think, essentially, you should do a search for conversations without any constraints, apply a filter on User:contains User list(a state that is a list of users):last item
The contains list is available if you’re not filtering
Kind of…
What I am trying to do is let the Current User go into messages and send a group message to multiple users. So let’s say I am current User and I want to message Doug and Tyler. So the first time I want to do that it simply creates a new conversation with Doug, Tyler, and myself. A few months go by and I want to message you both again (and for our purposes let’s just imagine that I forgot we had a group message before). So I go to message you both again by creating a conversation.
What I want to happen is if a conversation already exists like it would in that situation, it doesn’t create a new one, but just recognizes the existing one and opens that.
Roger. Got it. Are you using a repeating group of all previously saved conversations?
Yes, there is a repeating group whose data source is Group Search Conversation’s Filtered’s Conversations which is just a list of conversations whose users contains current user. Are you onto something?
Oh i’m finna crack the case bro
How I was able to
Of course, there will need to be some conditionals that you’d need to work out in my example.
But perhaps you can simplify your advanced search off of mine.
Did you try this in practice?
Cause with mine, it appeared to be working. But I realized after it was just pulling up the first or last (whichever I set) conversation that contains the current user and the users in the state. That may sound okay, but it still isn’t right.
For example: Building off the example I used before, let’s say I had a conversation with you and Tyler a few months ago. Now I want to create a conversation with just you. What happens now is it just opens up our previous conversation, rather than creating a new one with just you and me.
This is happening because in run mode the This Conversation’s User is not working for some reason. But if yours is working in run mode correctly, obviously I am doing something wrong.
How is your data set up? Cuz if you have a data type of Conversation that holds the User’s and a Message that ties to the Conversation, hold the message and the type of message, it should get your close.
To be fair, you’re filtered out the wazoo in your examples. I think you could simplify it.
Haha you are definitely right on that. It started simple, but has gotten pretty crazy trying to make this work. The data setup is pretty similar to yours though:
1 second please. I’ll try to fix it to your data structure so you don’t have to change anything.
You sir, are godsent. Sorry it is chaotic.
OK. TRY THIS
First, I had to find a way to add users to the convo but not start a convo per se
Now create a new message without any conditionals
Now create the convo conditionally
Here is the conditional
So I created a temp list I’m adding users to to create the convo. Later I’d delete the list so I’d be able to start over.
To avoid sending a msg twice, you’ll make sure the make changes to convo that’s > 0 is first in the workflow.
I think I figured it out. It definitely is more complex than I would like though, so maybe it can be simplified over time. However to get the desired functionality, this is what I had to do:
Starting when a User goes to “Create a new conversation” it sets the state of Users with just current user at first. Then, when you select additional users (by typing them and clicking from a repeating group), they get added to that state.
Now the part that seems to solve the previously mentioned issues is that when the user decides to “Start Conversation,” They click the button to do so. I have 2 separate workflows created for when this happens;
- Occurs only when the custom state of conversation users is < 3 (current user + one other user). This displays the data (conversation) in the desired group by searching for conversations that are:
- Private - a field in my database to show if it is just 2 users or more than 2 (set when initial conversation is created)
- Conversations users contains current user and set states users: first item
- Occurs only when the custom state of conversation users is >/= 3. This displays the data (conversation) in the desired group by searching for conversations that basically follows Tyler’s instructions before;
- Search for conversations: filtered…
As I said, it is more complicated than necessary probably, so I am going to see if I can follow what you did and achieve the desired results @doug.burden. Thanks for diving into this with me haha.
Yes sir you bet. If I could steer you one way of creating a msg feature. It would be to setup the data structure the way I presented earlier. It should save you tons of headaches. Non-the-less, there’s more than 1 way to skin a cat
Very much appreciated! I am definitely still going to try and simplify things a bit here.
Holy text wall that I woke up to
go back to sleep, we’re both still lost ha
Seems like the best way to do this. If you have two workflows on the same “Create conversation” button just make sure they are exact opposite statements so two don’t actually run in some weird edge-case.