Problem filtering table

I feel stupid. I try to do something apparently obvious but I can’t get it to work.

Playing around with Coda I try to set up a basic time tracking tool.

  • So I have a table that contains all my customers.
  • I have a second table with all tasks completed for different customers (looked up from table 1)
  • Then I have a selector to choose one customer I want to look at.
  • Finally I have a view of table 2 that I want to filter with my selector.

But it doesn’t work, what am I missing?

Did you create yourself the select list or did you use “Create control” ? :slight_smile:

I used “create control”

From your screenshot, I can’t say what’s not working but I’ve tried to recreated it :

Is this kind of “what you’re trying to do” ?

Yes, that’s precisely what I’ve tried to accomplish.

But I still couldn’t see the difference.

Can you?

Here’s the link to my doc:

No effectively, I couldn’t see the difference :wink: . (Thanks for sharing :wink: )

But now, looking at your formula in your select list I can say that the customer in Projekte is a list of Text and I think that this is why it doesn’t work : you’re trying to compare 2 different things (text vs. “reference”) so it can’t work :wink: .

It should work by using this formula : Filter(Projekte,[Kürzel])

Instead of : Projekte.[Kürzel]

1 Like

Thanks, I could make it work with your help, and I see the problem with different variable types, but I don’t understand how your solution fixes that.

1 Like

Glad to know you could make it work :grin: !

For the question, I’m really not sure that what I’m gonna say is correct, but I think that the formula Projekte.[Kürzel] was only returning a string without filtering anything, but the Filter() formula returns references to that field in that table.

Maybe @mallika or @BenLee could explain this better :sweat_smile:

I’ve searched a little bit in the Help Center and found this :

Ok, next step:

Now I want to pull the number of hours for the selected customer from table “Projekte” and show it here.

My approach doesn’t work, might again be a problem with the variable type:

I’ve read the doc that you’ve linked but I couldn’t apply it. :frowning:

It can be tricky to use formula on the canva but here I’ve got 2 apparently working formulas :wink: :

Here, it’s not really a problem of different variables (well there is one in your lookup()), but a missing part and that’s why both formulas use .Value to indicate to the formula that you’re looking for a precise data for the actual value selected in your select list :wink: (otherwise, the data you’re looking for could be the data of any selectable options referenced by your select list). So you weren’t that far with your Lookup() :wink:

Because your select list is already a reference, you can just use this first formula that sort of say that for the .Value selected in the select list, get the Stundenziel :wink:

  • [Select-Kunde].Value.Stundenziel

The second formula is a Lookup() that compares the Text field [Kürzel] in your table Projekte to the actual Value of your select list, which is a reference at this point. So to pull out the Text field and make the comparison doable, you need to indicate where to get the Text : in this case, it’s the field [Kürzel] too : which gives you this part of the formula : [Select-Kunde].Value.[Kürzel] :slight_smile: .

  • Lookup(Projekte,[Kürzel],[Select-Kunde].Value.[Kürzel]).Stundenziel

I’m not sure it’s very clear, but it’s really hard to explain those kind of subtleties :sweat_smile: