check this I think it would help you
This widget will hide or show its parent element, based on the result of a microflow or nanoflow returning a Boolean such that more complex visibility conditions can be composed.
there are many location associated with the same note how would you select a specific location to change the visibility
according to its value ?
you need to change the association to 1 to 1
note 1 to 1 location
or make the note the owner of the association
othernote 1 to * note
add a dataview inside the first dataview and select location over assoication
and add the button to it now you can change its visibility based on an attribute inside location
do the same for othernote
It's a bit of a workaround, but what we usually do in such cases is create a non persistable helper object to determine visibility. So for instance, when you open this page, do so from a microflow where you create a VisibilityHelper object. In the object, put a boolean attribute _buttonvisible. Set the boolean based on the expression you wanted to use. Also associate the object you used as a page parameter previously, so that you can still use it on the page.
Now pass the helper object to the page. You can now simply use the _buttonVisible attribute to set the visibility of your button.
As an aside: never rely on visibility alone for security. If users should never be able to use the button if they don't meet requirement x, y and z, then check that requirement when the button is clicked either way.