Record count in tab names for multiple models

Hi, I have multiple related lists organized into tabs on my Skuid Account page and I like to include the number of records located inside each tab so that users can quickly see how many records are in a tab without clicking on it. I do this by putting the following in the tab custom label 


This produces a tab that shows Contacts (3) in the tab name. My question is; if I have a tab with multiple models inside of it. ie. a Notes and attachments tab, what is the best way that I sum those together to produce one number for my tab label.

ie. if I have 4 notes and 6 attachments for an account, how can I sum ({{$}}) and ({{$}}) to produce “Notes & Attachments (10)” in the tab label.

You should be able to do a UI only field that adds the lengths together, then reference that field in your tab name.

Dave - were you able to make Raymond’s suggestion work? I have been trying to accomplish the same thing with no luck. I tried creating a UI only formula field (numbe format) to add together the lengths of two data models but when I used {{}} the page won’t load at all. I tried some other ideas like: 0+{{}} and {{}}+0 When I use the same syntax in a Rich Text element I do get the length of each data model like so: Model 1 = 12 rows Model 2 = 18 rows I also attempted the process discussed on this post: This allowed me to “add” to the two data sets together but it returned “1218” rather than “30”. Any ideas on where I might be going wrong?

Try a dollar sign in front of model: {{$}}

sorry. I had 2 typos in my comment. I do have the dollar signs in the syntax and i do not have “data.0.length” but rather “data.length” like this: {{$}}

Try wrapping each with VALUE: VALUE( {{}}) Also, make sure that the model the UI only field is in loads AFTER the model you are referencing in this formula.

That worked like a charm. I was going wrong on both points you made. Thanks so much for the help!

Great, you are welcome!

Raymond , I found a small wrinkle… If the count from “Model 1” is 5 and the count from “Model 2” is 7, then I get the correct value of 12 when summing the two models. However, if the count from “Model 1” is 5 and the count “Model 2” is null/zero then the formula does not produce a result. Is there a way to evaluate this? I referenced this post but did not have much luck. I tried these options as well to evaluate null/zero and produce a 0: IF({{$}}==null,0,VALUE({{$}})) IF({{$}}==0,0,VALUE({{$}})) IF({{$}}>0,VALUE({{$}}),0) Is this a limitation of skuid or is there a way to evalute?

Pat is pretty handy with Skuid and he reported a problem with formula fields not handling null values in this post:[settings][filter_by]=all&topic-reply-list[settings][page]=1#reply_16986449 There was no response from Skuid support. I would report it as a problem as a community post and see what they say.

Pat found syntax that worked for Nulls. See this post.[id]=16986512#reply_16986512

That did it.  Thanks so much Raymond and Pat.