show box only if in my dataset...

Hello! I am trying that if there are numbers in the dataset1 (owner) in the “notifications” column, it shows me a box but I realize that my code only searches the last row and I need it to search the entire database. Could someone help me please?

$w . onReady ( function () {

$w ( "#dataset1" ). onReady (() => { 
    **var**  item  =  $w ( "#dataset1" ). getCurrentItem (); 
        **if**  ( item.notificaciones  ) { 
        // If there IS a value in the database field show 

        $w ( '#box108' ). show (); 

    }  **else**  { 
      $w ( '#box108' ). hide (); 
    
    } 
}); 

});

How is called your DATABASE ? (DB-ID) ???
You are referring to which Database-Field? —> “notifications” ? or " notificaciones "?

Your if-else-statement is…???

if(currentItem.notifications) {$w('#box108').show();} else {$w('#box108').hide();}

What you are trying to do, will work only on a dynamic page connected through a dynamic-dataset.

Your dataset is NON-DYNAMIC, you are using a normal one.
That means you also have to tell your DATASET which ROW of your DB you want to navigate to.

For this you will have different options.

  1. using a dropdown
  2. using a table
  3. using a repeater
  4. and so on

If you need a detailed answer, you will need to elaborate more about your project setup!

Hello ninja!
Thanks to you I solved many problems!. I read you in many comments.
It is an honor that you are responding to this message.
We would like to be able to count on you for some integrations.
We send you an email.

On the other hand, everything you mention is true. our data set is normal.

The database is called “empleos” and the column we want to see is called “notificaciones”.

It happens that with the mentioned code it only searches in the last row and we need it to search in the whole column

Dataset1 is called “empleos” and is filtered as Owner.

What we’re trying to do is if a user applies for a job, display a box (box108) with the number of applications inside.

then if there are notifications show me the box with the number of them.
the number is conected to dataset1 column “notificaciones” inside the box 108

This box108 is inside a repeater connected to the same database

The help you provided in this forum was many times implemented on our website!

Thanks again!

Replied to your e-mail.

If you are interested, i can take a look onto your project.
This for i will need an invitation to your project (if you trust me).

More infos you will find in the e-mail.

It is always better to see the project directly infront of your eyes, so managing issues and debugging then is faster.

And yes, i already assumed, that you will have the mentioned issues.
Just some logical conclusions.