Hide/Show Elements based on data in dataset

I don’t understand how a screenshot will help. Do you understand what my problem is? I want to trigger a lightbox using a button which is only visible if the data in the context of the page matches the condition set in the button code.