Pic from one database to another

Newb here. I’ve been following the Wix series about setting up a social media platform for a small group.

When the current_user is writing a comment, I want that comment to show his profilePic and fullName; however, creating the comment requires the “write-only” database named comments . The profilePic (already displayed on the page, as userImage ) and fullName (not displayed already on the page) are in the database named users . The idea is that when the commentButton is clicked, the post will include the picture and name, now copied into the comments database . I’ve been searching the forums and have found some similar ways to code this, but I’m at a loss. I’ve added below what I’ve frankensteined together so far.


export function commentButton_click(event) {
let picture = $w(“#userImage”);
let user = wixUsers.currentUser;

 wixData.quer [y("user](user.id;) [u]s[/u] ") 
      .find(wixUsers.currentUser) 
      .then((results) => { 
              **let**  toUpdate = { 
                      "name": fullName, 
                      "picture": commentPic 
                  }; 
  wixData.update("comments", toUpdate) 
        .then((results) => {})   
         . **catch** ((err) => { 
          **let**  errorMsg = err; 
          });  
  }) 

}


I’m missing how certain operators are supposed to work. I’ve been on the Corvid reference, but I’m still not finding what I need. Any help is appreciated.

Are you talking about the series of YouTube videos from Michael Strauch (Wix Training Academy) as they are not actually part of Wix.

Building A Social Network In Wix | The Non-Coding Founder’s Guide
Wix Training Academy
You can find all his contact details and more about him in the ‘About’ tab in the above YouTube channel link.

They are made up by Michael himself who is an Wix Expert and if you are having issues with some of his videos or tutorials then you are best reaching out to him first for a response as it is his own work.

No, he doesn’t cover this particular aspect. That’s why I turned to corvid. I need help with the actual coding. I just gave the background to help paint the picture.