How to delete value from a list of values using a button?

… And avoid having blank values in the list as a result, like this:

I explain in detail in this doc.

Thanks in advance, I can’t figure this out…

Hi @Fran_Vidicek

Here is my suggestion, I created separated column for better understanding

First I check which value of current rows must be deleted according to your wish. For example in Item 1 we dont care about Folder 1, cause folder 1 doest not belong to parent folder for item 1.

Then, we calculate what will stay after the completion of the macro

Please mind here the final .IsBlank().Not() that will remove the undesired blank value in the generated sublist

Make a Master Button to replace each “parent folder” column to “what stays” values


Let me know if this is OK for you



I’ve been watching at the formulas for a few minutes now…
Woah, :exploding_head:. Still trying to wrap my head around it…

So far seems like exactly what I was looking for though!

1 Like

Ahah thanks @Fran_Vidicek
Let me try to translate it in english :slight_smile:

  • Column “To Delete From Parent Folds” : please coda, check one by one all parents folder value in this currents Row. Once you’ve got first value, verify if this value is ticked in Folder database as “selected”. If Yes, write this value (I want to delete it !), otherwise make a blank value". Please do that for every value in Parent folder. When you’re done, please delete blank value, i do not need them ! Now, I’ve got value to be deleted from the Parent Folder, according to selected value in Folder database

  • Column What Stays : please coda, check one by one all parents folder value in this currents Row. Once you’ve got first value, Check if this value is not in the column “To Delete From Parent Folds”, if it is not, that means that I want to keep it, so please keep it. Do that for every parent folder. And at the end, please delete blank value, I do not need them.

  • Master Button : Please coda run through every row in items database, for each row i’d like to replace the column Parent Folder to the column “What Stays” :wink:

Hope this is more clear :wink:


That makes is very easy to understand.

I have another question… or two… :thinking:

  1. Is it possible to achive this without the use of extra columns?

  2. The only reason I am asking this is because of performance: Will having extra columns have any effect on performance of my doc?

I would have a view of the Items table where these columns wouldn’t be shown anyway, but does it affect the performance regardless of if they are visible or not? Keep in mind, there might be 2000+ rows.

In other words: If I have a table with 2000+ rows and 30 different columns but I also have a view of that same table in a different page that shows only 4 of those columns.

Do those invisible 26 columns have negative performance effect on the doc speed?

Hmmm, I need to have a look on that. But as a master button including all formula will require to have 2 or 3 several ForEach() function, I usually dont even try doing this (As Far As I Know this is impossible to perform multiple foreach, refering to current value 1, current value 2, etc… which is a pity). May be better coda master than me will know if there is an efficient way to do that.

Honestly, I havent work with more than 2000+ rows, and as long as I hide my column, I do not see any performance issue. but this is people depending I understand.

Let me have a look on a master button and keep in touch

1 Like


Ahah… :smiley:

    CurrentValue, [Parent folders], 
  CurrentValue.[Parent folders],
    Folders.Filter(Selected).Contains(CurrentValue) = True(),

Check “Ultimate Button” in my doc :wink:


1 Like

if you want to nest ForEach() loops and yet have access to the currentValues for each outer loop, you must use the WithName() function to name them.

so your outter and inner loops might be


now you can refer to thisCust for the current customer and thisOrd for the current order, etc…



:confetti_ball::tada:Thanks a ton!!!:partying_face::tada:

I’m too tired right now, and by just glancing at the formula my brain is resisting to look at it (it’s complex).
I will look at it when I get rested tomorrow, but just wanted to say thanks for the help.

ForEach() and WithName() formulas are quite advanced for me so combining them will be interesting challenge to comprehend.

But this code below doesn’t have closing parenthesis so I’m assuming it’s not finished? :thinking:

1 Like

Thanks @Xyzor_Max :slight_smile:
I usually don’t use with name cause I see my gorilla without it, but in this case this is a real and valuable addition !

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.