Object view tabs visibility, option for linked object set not empty condition

Currently the object view tabs support two types of visibility conditions: property value conditions or linked object type visibility conditions. The latter option (tab is visible, if the user can see the linked object type) is somewhat close to what I’m after, but not quite.

In the ontology I’m working on both types are always visible for the same user, but behind the link there are 0-n related objects. The tab view I have is basically a list of these objects and an object view of the selected object. If the object set of the related objects is empty, it makes no sense for the user to see the tab at all, since if they open it there is nothing there.

To support this kind of view, would it be possible to get an option for a linked object set not empty condition?

Hey! Thanks for the post. For a more expressive conditional visibility experience, we recommend building your tabbed layout directly in Workshop using the Tabs widget, allowing you to create several tabs all within a single object view tab. This supports more flexible conditional visibility through Workshop’s variable system. For your use case, create an object set variable that uses a search around to find objects connected through your link type. Then use a Boolean variable transformation with Is empty or Is not empty, and use the resulting Boolean variable to control the tab’s visibility.

Ended up having a similar case with another object type, which has an optional property with a lot of text. The text is displayed in a markdown widget on a separate tab, but if there is no text to display I’d like the tab visibility to be disabled.

Thanks for the answer, either missed it or it was not approved before my previous post.

Looks like the tabs widget fits the bill, I added tabs to the module header and created pages for different tabbed views. Configuring the on click event for the tab was initially a bit confusing, since “switch to page x” options appeared in the dropdown after creating the pages. Would be nice to have a option “create a new page” which would pair the tab with a new empty page.

The conditional visibility works as expected, the tabs are more configurable and support icons, and the workshop no longer loads a new page in the editor when switching tabs, so that’s nice. What worries me a little bit is that for more complex views the amount of variables might become overwhelming. Then again, more complex tab views probably belong to their own workshop apps (with module interface variables).

I’m not entirely sure if this is considered a “workaround” or the way to go in the future, but since this approach works for me I’ll mark the issue resolved.

I’m glad this resolved your issue! And yeah this is considered the correct path forward, we have plans to reduce the visibility of object view tabs to make this opinion more clear over the coming months.