Conditional Action to Navigate or Create a Messaging Document

Actions & Logic
Resolved

I'm trying to set up an if-then action in my FlutterFlow project for a messaging feature. Here's what I need:

  • If a messaging document already exists between two users for a specific post, then navigate to that existing chat document.

  • If not, then create a new messaging document.

    The problem i have with my current action is it displays the same chat for every user.

What have you tried so far?

I look at the community and found a person with the same problem. They ended up figuring it out and gave a brief descrption. Basically, they queried User A and Quried User B and if it returns with a document, then it navigates to that document, if it doesnt it creates one.
Here's what they did im unsure how to implement this to my specific project.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
3 replies