Hey all,
Having a strange problem here.
I’m working with a custom pack formula SearchPeople that returns an Array of People objects, each of which have properties like Name, ID, etc.
I am trying to create a button that runs the formula and - for every result - adds a row to two separate tables.
My first attempt is this:
ForEach(SearchPeople([API Key], "test search" ,thisRow.Company.Website),
if(NOT(CurrentValue.Id.In([!People].[Apollo.io ID])), runactions(
AddRow([!People],[!People].Name, CurrentValue.Name, [!People].[Apollo.io ID], CurrentValue.Id),
AddRow([INTERSECTION - Employment CompanyxEmployee], [INTERSECTION - Employment CompanyxEmployee].Company, thisRow.Company, [INTERSECTION - Employment CompanyxEmployee].Employee, [!People].Last())
),
_NoOp())
))
But instead, I get the error
“Could not find Name reference in CurrentValue”
This is strange, however, because that reference certainly exists. And it’s certainly returned. If I modify the formula to just add ONE row to ONE table and dispense with RunActions
ForEach(SearchPeople([API Key], "test search" ,thisRow.Company.Website),
if(NOT(CurrentValue.Id.In([!People].[Apollo.io ID])),
AddRow([!People],[!People].Name, CurrentValue.Name, [!People].[Apollo.io ID], CurrentValue.Id),,
_NoOp())
))
It executes perfectly and adds the one row.
It seems to me like RunActions is preventing a reference to the CurrentValue from the For loop. Is this intended behavior, am I doing something funky,. or is there a bug at work here?