Adding users to chat (Xano Database)

So you have conversations table and inside it, you have an array of users i guess.

Relationships work quite different with Xano-Adalo, you need to set things up to work as you intend.

A great way to do this is to have conditional logic on Xano on the UPDATE endpoint. After the initial update conversation in your function stack, have a conditional like this:
if input.conversation.created_at = ****ADDUSER
then update conversation > users = conversation.user APPEND input user ID.

To break this down a bit, what we are doing is from adalo, we send some text ****ADDUSER in a field that we are never actually updating, but then using that input to trigger conditional logic. Even cleaner would be to create a new field called ‘action’ which you purely use for this kind of thing. Also ****ADDUSER is just something i made up, call it anything that makes sense to you, the **** at the start isn’t necessary.

With profile picture, the source should be URL, and you can then choose current user > profile picture >url.

It takes some getting used to the integration but it’s powerful when you figure it. Feel free to book a consultation with me if you need some help getting going.

1 Like