Referencing values with different names

Hi, how do I sum a group of values, when the value has a different name in each operation?

These are columns in boards. They’re all named PATIENTS, but they have different IDs, which I can’t change.

I can get the ID:

Then I use that to get the rows with just that column

I use the Array Aggregator to put all rows in the group I want to total into an array. and now I have this:

But another operation (different board) looks like:

I’ve been trying for hours but I cant figure out how to get the sum of Patients for each board/operation.

Can I change what the value is called in the array? Or can I use the ID variable within the sum function?

@CarlaK this one is tough, I’ve done this same setup below with the following approach; it’s a little clunky and tedious based on how many boards you have, but it does work well

you can use a switch module to switch the output of the boards column ID you need to updated. ‘patients’ in your case so put the board ID mappable variable as the input to the switch module. Then for each of the boards you will be using
Put the actual hard coded board ID as the ‘value to match.
And put the the output as the Id of patient column. (patient, patient_2, etc) repeat this for however many boards you need to get patient info for in Monday

1 Like

Thanks @timlittletech

I eventually realized I was overthinking things. Now, for each row, I iterate through the array of columns, and filter for the column titled “PATIENTS”, no ID required.

But now I’m stuck again. I’m trying to add the value of PATIENTS to an array, mainly so I can see it’s doing it right, before I sum them together. I feel like I’m missing something very simple or obvious because I can’t make it work.

I create an empty array variable before listing all the rows, then after filtering columns for PATIENTS I am trying to use add() to insert the new value. The documentation tells me about the function, but not where and how to use it, and I must be doing it wrong.

I’ve tried changing the variable lifetime, using get variable instead of set variable. I’d appreciate any insight anyone has!

Awesome, yes your way of iterating through columns and filtering to title based on patient makes sense.

re the variable/adding to an array. You should not set your variable name as a mapped value. The Variable name should be static. In addition to that couple of follow up questions.

  1. Why do you need an array of patients? you are just trying to get the sum of all patients across multiple boards right? in that case I use a running total where I first set a variable to 0 and then incrementally add the number to itself for subsequent bundles.

If you’d like a free 30m consult I’d be happy to talk and you can schedule here: Calendly - Tim Little

probably would be easier to get it over a zoom call.


1 Like

Hi @timlittletech

I have 9 boards with 1, 2, or 3 groups each. I’m trying to make a board that lists the group name and the group’s totals for 3 separate columns (patients and 2 others). I was trying to use the array because the example I found has sum(map( etc.

Either using an array or your suggestion of setting a variable and adding to it, I hit the same problem. I’m sure I must be missing something obvious lol… I can’t get it to save to itself…

number set to 0, repeater starts 1 til 3

I would expect the outputs to be 1, 3, 6

Thanks again for your help, unfortunately I’m asleep when you’re available for a call, and probably vice versa. I’ve watched a million videos and am pretty comfortable with most things, it’s just this one thing that has me stuck!

@CarlaK yes if you have an array of the values then you can just use the ‘sum([array])’ and it will do all the hard work for you.
but in the case where they are in bundles etc… you have to set the variable and then get it again. This is inefficient but effective.

see below screenshots, hopefully that gets you over the edge.

1 Like

Thank you so much @timlittletech! I knew it had to be something so simple haha. My brain can finally rest :slight_smile:

1 Like