Problem with foreach()

I have a table “publications”, in which I apply an automation. The last step of this automation (step 8) creates a new row in the table “AllEvents” using the information from the JSON object that I have in the column “informations”

What I want to do next is to check if in the finale table “Events” there’s a row with the same “Name” and “Company Name” as new row in “AllEvents”, if yes; I want to modify the column “source” in the table “Events”, if no; I want to add this row from table “AllEvents” to the table “Event”

This is the formula that I wrote but it keeps throwing configuration error :

ForEach(thisRow.[Step 8 Result], WithName(CurrentValue, element , If(and(Name.Contains(element.Name), Company.Contains(element.Company) ), ModifyRows(Event.Filter( And(element.Name=CurrentValue.Name, currentvalue.Company=element.Company)),Event.Source, Event.Source+", "+element.Url) , AddRow(Event, Event.Name, element.Name, Event.Company, element.Company, Event.[Function Type], element.[Function Type], Event.Event, element.Event, Event.Date, element.Date, Event.Gender, element.Gender, Event.Age, element.Age, Event.Nationality, element.Nationality, Event.Source, element.Url ) ) ) )

Hi Zainab,

It is generally better to share a doc illustrating your problem, and it becomes even more important when the formula is as large as this.

Regards
Piet

Hello Piet,
Thank you for your response.
Here is the link to my doc : https://coda.io/d/_dIxcM8bFu2w/Publications_su2Gc

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