Is there a way to chain both conditionally visible and disabled buttons? Scenario is that the button should be visible to only certain users, in addition that button should be disabled till certain number of objects have been selected. I am able to do each task separately but not able to chain the conditions in workshop to disable the button. The image is the closets solution I could find. In this solution, the button is hidden from users till they select an object. I’d like the button to be visible at all times to the specific users.
Hey, there are a couple of ways to do this.
I assume you effectively have 3 cases:
- Users who can never see the button
- Users who can see the button but only if they have selected enough objects
- Users who can always see the button
You can use additional boolean comparisons or if/Else statements to combine the output from previous blocks. You can then use the output from this combined logic to determine the visibility of the buttons.
Alternatively you could use a function backed boolean property and write logic to make the determination of if the boolean is visible based on whatever variables you pass to the function as inputs.
Hope this helps.
Another approach is to place the button inside a section. You can conditionally show / hide the section based on whether the user should be able to view buttons or not. The buttons themselves would be disabled if the object conditions are not met.
This solution did what I needed. Thank You for the help. I had forgotten about hiding a section. Not ideal but works for this use. Would be nice to have the ability to set both Hidden and disabled together in the button config.