Hide button connected to dataset

Hi, some of the presentations have a PDF file to download, some don’t.

How can i hide the button for the ones that don’t?

Thanks.

Hi Mircea ,
Some code is required.
Here is a sample code:

$w('#myDataset').onReady(() => {
    let itemObj = $w("#myDataset").getCurrentItem(); 
    if (itemObj.pdf) {
        $w('#button2'). link = itemObj.pdf;
    }
    else {
        $w('#button2').hide();
    }
});

For more information:

Good luck!
Roi

thx bro, it worked.