I’m having an issue with the ForEach formula. I swear I’ve done something like this before, but I guess not. I know there are other ways to get the list, but for this project I need it to be a button that does this.
The tables have a relation with each other (they’ve been talking about moving in together, actually). My goal is to have a button on the PODS table that takes the Number values from each SPECIALTIES object and makes it into a list in the Specialty Numbers column on the PODS table.
I know there are way easier ways to achieve this, but it’s just one part of a larger formula. In theory this should work, so I’m more looking for why it isn’t working rather than just a way to get the list of numbers, if that makes sense.
with your button formula, because it’s used ForEach(), it overwrites the A (4) and B (5) one and thats why you’re left with C (6).
if you want all the numbers i.e. 4, 5, 6 then as @Pablo_DV has suggested, is to get the list combined and then just “stamp” (modify) the Specialty Number column once.
REPOSTING THIS BECAUSE I ACCIDENDLY DELETED THIS RESPONSE
It’s kind of a lot to explain, and I can’t share the doc. But basically:
There is a third table called PEOPLE, each row there has a has a column that ranks their specialty interests (1st, 2nd, 3rd). So I need a button to loop through the list of Specialty column values, look for a student that has that interest as their first choice, and then stick them into a column called People.
Theoretically I think your formula should work, but maybe the result of the previous modifyrows() has not yet been stored in the database when you are already calling the next one.
I would recommend to do the listcombine() within the formula and then store the value with a single ModifyRows(). Something like this