FormulaMap: From textfield >> list >> adding the single items to a new table

Hi all

Struggling with FormulaMap.

I have a text field with emails, want to
a.) getting them as a list Split(thisRow.Members,"," ).List()
b.) want to add them to a new table thisRow.Preview.formulamap(AddRow(mailing_member, mailing_member.email,CurrentValue))

Result: it always adds the 2 in one item, instead of 2 items.

Checked all the community threads here, but not sure what I doing wrong

Hi @Ainara_Bilbao ,

To take the list of email addresses in the “Members” column and add a new row for each one in the “mailing_member” table, this formula should work for the button action.

thisRow.[Members].List().Split(", ").FormulaMap(AddRow([mailing_member], [mailing_member].email,CurrentValue))

Here’s the breakdown of the formula:

  • thisRow.[Members].List().Split(", ") is the email address column split into a list
  • FormulaMap() is going to be the formula that we run for each item in the list
  • AddRow() is the action we want to take for each item in the list
  • Inside AddRow() we have the table we want to target, the column we want to target, and the value we want to add to that column
2 Likes

Thanks @BenLee will check :pray:

works perfect, thank you so much @BenLee

1 Like