I'm trying to concatenate a list of names and titles for all people involved with an organization who is the buyer/borrower, but I can't seem to get it to iterate through the {{Order.Buyers.People}} collection in the ReadyDoc. I can do it in the Formula Editor, but not here.
Code: Select all
<COMMENT> PC {{Order.Buyers}} </COMMENT>
<VAR $Names (“”)>
<VAR $Counter (0)>
<VAR $PeopleCount (0)>
<FOREACH ({{.People}})>
<VAR $PeopleCount ({{$PeopleCount}} + 1)>
</FOREACH>
<FOREACH ({{.People}})>
<VAR $Counter ({{$Counter}} + 1)>
<IF ({{$Counter}} = 1)>
<VAR $Names ({{.FullName}} + “, its “ + {{.Title}})>
<ELSE>
<IF ({{$Counter}} = {{$PeopleCount}})>
<VAR $Names ({{$Names}} + “; and “ + {{.FullName}} + “, its “ + {{.Title}})>
<ELSE>
<VAR $Names ({{$Names}} + “; “ + {{.FullName}} + “, its “ + {{.Title}})>
</IF>
</IF>
</FOREACH>