Getting Data from Two or More Tables

Hello,

I have two tables in my database, Companies AND Users. I want to create a table that shows all of my users, and then I want to show the company name next to that user. Right now my table is setup to pull from Users Table, when I try to display the company name, I am only getting the primary key for the Row from Xano, not the company name. How do I solve this problem?

Thanks!

1 Like

@patopt

Two options:

  1. Backend: There are several ways to do this inside of your backend, but because you are using Xano, probably the easiest is to use Addons. This will give you the ability to simply “attach” your company to the user based on the account ID of the user. Xano has great documentation on this. As well, they hold office hours and can help you get this set up.
  1. Front End: If you wanted to do this on the front end, you could create two API endpoints in Xano. One for users, and one for Companies. Then, call those endpoints inside of WeWeb. Now, you have all of the information you need inside of WeWeb, so you could use the NoCode array functions to combine the data. If you want more of a walk through on this, let me know. My guess though is that you probably want to use option 1 inside of Xano.
2 Likes

WOW that was easy for option 1. Thank you!!

2 Likes