# Basedash launch demo 4: Variables

Tom Johnson · 2025-01-28

[Basedash](https://x.com/tomjohndesign/status/1884321097602200022)

The fourth launch-day demo for [Basedash](https://www.tomjohn.design/content/basedash), after [the SQL editor](https://www.tomjohn.design/content/basedash-sql-editor), was about variables. They sound kind of intimidating if you're not a developer, so we tried to make them so easy you won't even know they exist [(0:13)](#t=13). I had the Dockhunt database connected, which is basically users and apps, and I started a blank user dashboard, what we call an entity dashboard, a dashboard for one thing in your database [(0:34)](#t=34). Then I told Basedash to show me a user's avatar [(0:44)](#t=44).

![Asking for a user's avatar on a blank user dashboard, captioned as I say: “All right, I didn't tell it a table name. I didn't tell it to create a variable. I didn't tell it to do anything.”](https://nlzkl2bo0qmd3uti.public.blob.vercel-storage.com/talks/clips/basedash-variables/didnt-tell-it-vI2SUmsvkEECVH0R6UvhEiB4Y0H0gf.mp4 "Clip")

It knows from the database that there's such a thing as a user, and that users have an avatar column, and it hooks it up [(0:56)](#t=56). That's why this one takes a little longer, because it's introspecting the SQL query and adding a variable to it so I can change which user it shows [(1:11)](#t=71). The user is at the very top of the dashboard, so I searched for myself, and the query already said where ID equals user ID, with the variable defined automatically [(1:37)](#t=97).

![My avatar on the user dashboard, with the user ID variable in its SQL query, captioned as I say: “I didn't have to do a thing. It's right there. Where ID equals user ID, search, built in, variable, automatically defined.”](https://nlzkl2bo0qmd3uti.public.blob.vercel-storage.com/talks/clips/basedash-variables/automatically-defined-0wR7EFmeYDAbCVs7lxJCumdLd627on.mp4 "Clip")

I'm not going to lie, I love this feature, because I've used other tools for building admin panels and dashboards in the past, and this is kind of remarkable [(1:50)](#t=110). I added the user's details and looked up Robert Cooper, then asked for the apps in his dock, which just took a second to run [(2:24)](#t=144). Back on the dashboard I could see the 17 apps I've docked beside my avatar and details, and rearrange them into a little profile [(2:40)](#t=160).

![The user dashboard with my avatar, details and docked apps, captioned as I say: “I can go back to the dashboard and I can see I've docked 17 apps. Here's my avatar. Here's my, you know, details”](https://nlzkl2bo0qmd3uti.public.blob.vercel-storage.com/talks/clips/basedash-variables/profile-tZRz9jbvig0pXOuV3RsbA9qxkyjIhC.mp4 "Clip")

User activity was a bad example, because our Dockhunt database doesn't really have events [(3:25)](#t=205). But all I had to do was talk about "this user's" something, and I had an entity-level dashboard. We make these for users, for organizations, for chats, for any entity in our database [(3:33)](#t=213).

When I posted it on X I wrote:

> Demo 4- Variables
>
> This is one of the most powerful parts of Basedash . Variables...  well they just work.
>
> Other tools have had the ability to add these to queries for a long time. But the thing with how we've made it in Basedash, is that you don't have to add them.
>
> They add themselves.
>
> Just tell the AI that you want to make a "user's avatar" and it will know enough to make that a variable.
>
> "This user's orders"
>
> "This organization's members"
>
> "This chart's chats"
>
> It just works. Yeah, you can add them the old fashioned way, but once you see them just work, it's kinda hard to ever go back.
>
> (Also, ran into some bugs with this demo, so bear with me a bit haha. Doin these live)
