Hello everyone, so I am relatively new to Wix Code and I want to create a dynamic gallery that retrieves its content from the database based on the image category. The gallery will be put on a Lightbox, but for some reason it seems that my code fails to retrieve data from the database and I can't figure out what exactly went wrong.
This is the code that passes the category (projectName) to the Lightbox based on what button I click and opens the Lightbox.
![](https://static.wixstatic.com/media/a27d24_4828cde8cd344d249968649d11c84cde~mv2.png/v1/fill/w_747,h_490,al_c,q_90,enc_auto/a27d24_4828cde8cd344d249968649d11c84cde~mv2.png)
This is the problematic code, it successfully retrieve the category from the session but seems to fail to retrieve the data from the database.
![](https://static.wixstatic.com/media/a27d24_e08289b1670541529522ee586fa6f97a~mv2.png/v1/fill/w_779,h_657,al_c,q_90,enc_auto/a27d24_e08289b1670541529522ee586fa6f97a~mv2.png)
The result of the code above:
![](https://static.wixstatic.com/media/a27d24_0cf9655dab3d4ef0b61e1f700f49b06f~mv2.png/v1/fill/w_858,h_214,al_c,q_85,enc_auto/a27d24_0cf9655dab3d4ef0b61e1f700f49b06f~mv2.png)
The database from it supposed to get data from, I've already set permission so that it can be read by everyone
![](https://static.wixstatic.com/media/a27d24_ad13f55f1d4249ea9e57d81ccb8eabb3~mv2.png/v1/fill/w_961,h_275,al_c,q_85,enc_auto/a27d24_ad13f55f1d4249ea9e57d81ccb8eabb3~mv2.png)
I really appreciate any comments or suggestion for this problem, thanks
Hi,
I guess this is the problem .eq('ProjectName', value), check the name of the field key in the database.
Roi.