How to set up summary values from table

Hi guys,

Basically, we are using Coda to manage our inventory, and the table has been hugely helpful.

  1. Recently, I’ve set up a summary at the top of the table to show which items need to be restocked. However, they’re all in one line like this :point_down:t3:


    Is there any way to improve the formatting? e.g. break them up into separate lines.

  2. I would like to send a weekly summary to my team, e.g. on Slack for the same message, basically rounding up things that need to be restocked. This is how I’m setting it up (the action is to push the button to send the notification), but it keeps showing “false” even though there are a few “YES” values.
    Could anyone please let me know what I’m doing wrong here?


    Here’s the zoomed in condition

TIA!

Hi @Duy_Nguyen,

For your first question, try adding “.ForEach(Concatenate(CurrentValue.Name, LineBreak())).Concatenate()” to the end of the formula. So …

Filter( View: [Canada] Need to: EB Ship from Warehouse to T = “YES” ).ForEach(Concatenate(CurrentValue.Name, LineBreak())).Concatenate()

For the second question, the little icon at the end of the “chip” -

image

indicates that the chip represents a list of values, rather than a single value. Therefore the formula is actually asking “does this list equal YES”, which of course the list doesn’t. The values in the list may all be “YES”, but the list actually looks like “YES, YES, YES”. One way to test these kinds of things is to write the formula on the canvas and see what is returned. However, in this case Coda is already showing you what is being returned by the formula -

What your formula needs to be is something like …

Filter(Impack - Master inventor, Ship from Warehouse to =“YES”).Count > 0

Hope that helps,

Rohan

Hi @Rohan_Mitchell , thanks so much for the pointers!

For (1), it worked! I replaced Name with the Product Name column and it’s showing up correctly now.

For (2), I think something is missing from the formula. I got this message

When I pointed my mouse at “Count”, it suggested I use “Count()” instead.


If this is the case, what should I include between the brackets?

Hi @Duy_Nguyen,

The first problem is with the Filter formula. Written the way you have done, the Filter formula requires two parameters - “List”, and “Expression” - so you need a comma between “Impack - Master inventor” (the “List”) and “Ship from Warehouse to = YES” (the “Expression”).

You could also write the formula this way -

That is - Impack - Master inventor.Filter(Ship from Warehouse to = “YES”).Count() > 0

You have written your formula in the syntax style of “Filter(List, Expression).Count()”. The other way which I have shown is List.Filter(Expression).Count().

Both are perfectly valid, it is really just a matter of what makes sense to you.

Yes, for the Count formula you just need to add the brackets, but they will be empty written this way. To explain, per above, you could also write the formula this way …

Count(Filter(Inventory, Ship=“YES”)) > 0

… and this way you see what is “in the brackets” so to speak.

Hopefully that all makes sense!

For completeness sake - in your formula you use ‘count’ and that should be ‘count()’ (with the parenthesis)