Number count in badge with extra filters

A user recently reached out asking how to display a count of the total number of records connected to the logged-in user’s company inside a badge on the menu component.

At first, I didn’t think this was possible but it turns out almost anything is possible with Pipes involved :slight_smile:

This is the end result we are looking for. (The current logged in user’s > Company, has 6 Projects connected to it)

Here’s the video of me explaining how to do this:

There was a bit of back and forth before I got the pipe involved so I’ll include missing info below

Reference for video below



  • Name: Logged In Users Company

  • Slug: loggedInUsersCompany


  • X-Tadabase-App-id

  • X-Tadabase-App-Key

  • X-Tadabase-App-Secret

  • (remember to put in your API keys for the Values)


  • JSON - total_items - Total Items

Add the Menu Item inside the Menu Component

Projects <span id="menu-badge" class="badge"></span>

The JavaScript code for the Layout (This appends the text in the HTML component to the span inside the menu item)


The HTML component source code
<p><span id="html-component-variable">{YOUR_PIPE_VALUE}</span></p>

Remember to change {YOUR_PIPE_VALUE} to the pipes value.


This is sweet Chem, glad you could get this to work.

Great hack, I love it!

1 Like