Data doesn't display

Hi all! Need some help here, I’ve been trying to display the data from a sql db (which has 2 data records in a table called ‘products’), but I couldn’t make it work, this is my setup:

  1. Created a new connection to my databse with the ‘Database Manger’ (MariaDB 10.5 and it’s stored in my computer/local device). I can fetch the data, so I imagine everything is ok here.

  2. Within server actions module, I added a folder called ‘product’ and inside of it I created an ‘Action File’ with the name ‘list’. After that, within the Action File I added the ‘Database Connection’ and ‘Database Query’ actions, targeting the database connected earlier.

  3. Within my App global element I created a ‘Server Connect’ element (linked to the products action file) and a repeating row element which targets the Server Connect element’s data (the response of the query defined in 2).

  4. Finally, within the repeating row I added a new column element, which should show 2 columns as I have 2 ‘products’ records, but it doesn’t display anything.

Also I’m using Docker (named ‘Development’) and Node.js.

I followed along with the ‘wCart’ youtube series (https://www.youtube.com/watch?v=zvu8evsEovg&list=PLUjqTJN3byC9sKH9EbikpTOli5OqdKwwS&index=1&ab_channel=Wappler), the only difference is that I used Node.js and my own database connection through the Database Manager.

Any help is appreciated!

Try looking at the inspect element network tab… The server action is fetching data or not in the first place.

If it is, check the html for row in the browser after page has loaded. If you see multiple colmn entries, it means repeat is working.

The problem in that case could be the binding inside the column. Check if there is a typo or something in tue data binding.

If you are talking about the data not displaying in Wappler design view, I’m not sure I can help there.

Hi @filetelier,
From your screenshots, it looks like you have the repeat set up with columns but nothing inside to display. Try adding a paragraph or title and setting a dynamic attribute (Inner Text - under Display) to one of the fields of the repeat.

Thanks @sid and @bpj,

I solved it, the problem was (or what I think it was) that I was connecting a Database stored in my computer, but it was outside of the container/project folders, so it couldn’t be read. I created a database from project settings, then connected with my db manager (Heidi) to it and imported my tables.

I hope it makes sense hahaha.

1 Like