Hide tab based on count

If I have 2 tabs with the same count is there a method to hide one of the tabs.

If Member has a count of two which equals the Location count of two, then I want to hide the Location tab. How do I render this?

Set the render conditions of the location tab to be the following:

Source Type: Model Property
Source Model: Member (or whatever is driving your Member count of 2)
Model Property: # of rows in Model
Operator: =
Content: Single specified value:
Value: {{$Model.Location.data.length}}

Craig… I don’t think conditions will process merge syntax.

Yup that’s right. Condition values do not process merge syntax.  Sorry.  I don’t think there is an easy way to do what Bill is asking.  Some Javascript needed…

I believe that you could create a model with model conditions requiring the counts to be the same. Then if that model has rows, you don’t need to render the tab.

Ah of course, didn’t think about merge syntax in the conditions. My understanding is tabs are not constantly re-rendered, so if you did have a model like Matt suggests, you would have to have a snippet to re-render the tab after the “data rows model” is updated. Is that correct?

Craig,

I believe you would just want a model action on your “data rows model” to run a one-line javascript snippet:

skuid.$C('MyTabsetId').render();



Yep, that’s what I was talking about!