Ok… So, I have no idea why this worked… it’s a bit backwards, but seems to do the trick.
As I mentioned, I set up a field called “pdfOrLinK” and on the database I just typed in for each entry which it was. When I did the code below, the only way it would work was to say that if it says “pdf” show the URL button, and if it says “link” then show the PDF button. It’s backwards, but for some reason it works the way I want it to. Oh well, I’m happy.
import wixData from 'wix-data';
$w.onReady(function () {
$w("#dataset1").onReady(() => {
$w("#repeater1").forEachItem( ($w, dataset1, index) => {
if (dataset1.pdfOrLink !== "pdf") {
$w("#viewURL").show();
}
if(dataset1.pdfOrLink !== "link") {
$w("#viewPDF").show();
}
});
});
});