Output data from multiple rows

I am getting an error and not sure if my logic is flawed or I am mixing a people field causing the problem

I have a Missions and sub-missions. I am trying to show all the people that are in any mission or sub-mission that has the same parent mission. So in my formula I am filtering the table of MDB-2 to only show results where “related parent Mission” is equal to the Mission name and the I am trying to output the people names.

Once I have this working I want to also add any members added to this sub-mission and also make sure they are unique. I assume I will be using Unique() and Combine() but haven’t gotten there yet.

Thanks in advance for any help.

Hello,

You have an error in your formula. The underlined red part is completely separate, and this is why it’s returning an error. To fix it, simply remove the MDB-2 part. I’m not sure if this will fully resolve your issue, but it will correct the formula.

MDB-2.filter(Mission.contains(thisRow.[Related Parent Mission])).Members

To help us assist you better, please provide more details about your table structure:

  • Are you working with a single table or multiple tables?
  • Are missions and sub-missions columns in the MDB-2 table?
  • Do they reference other tables or rows from the same table?
  • Is the related parent Mission* column a relation to another table? If so, which one?

The best and easiest way for us to help is by sharing a doc that replicates the issue. Make sure the link allows everyone to edit (or share a copy with dummy data if your original doc contains sensitive information).

Best regards,
Arnhold

Thanks Felipe. I will answer your questions and I have also added a redacted version below:

  • Are you working with a single table or multiple tables? I use many tables but this formula isn’t referencing other tables

  • Are missions and sub-missions columns in the MDB-2 table? Under the one column is the mission. What defines it as a sub-mission is by using Coda’s built in sub-items so the “Associated Parent” column was just a renaming of the parent column.

  • Do they reference other tables or rows from the same table? Not sure your meaning. Trying to get the current column to return all users that are in the Parent Mission and any of that parent’s sub-missions (sub-items). In other words, since this is a sub of the parent, all members should be equal to the members for this specific task plus the members of the broader parent mission.

  • Is the related parent Mission* column a relation to another table? No. It is just the renamed Parent Column

Thank in advance for any guidance or thoughts

Chris

if I’ve understood correctly, here’s what you wanted to do :

Math

1 Like

Thanks so much. So basically instead of saying show me all roles where the mission was equal to this parent’s row, you did by saying “filter by all rows showing the same parent as this row”. Definitely sounds smarter. Curious if my way, even ugly, could work? I don’t like my way but just asking to try to figure out the flaw in my logic so I can avoid in the future. Really appreciate this!

Hi @Math_24,

I realized it didn’t quite work. A parent doesn’t include the children’s members and Children don’t include other chlidren.

Solved as follows:

IF(isBlank(thisRow.Parent),thisRow.Members,

thisTable.Filter(ToText(Mission ).Contains(totext(thisRow.ParentParent)))
.Members .ListCombine(thisRow.Members)

.Unique())