Views:

Description

Iterates over a set of records and performs an action.

Used when a ForEach loop inside another ForEach loop is required. 

Signature

ForEachRecordNested('entitycollection', 'action1', 'action2')

Example

Update all the addresses of an Accounts grandchildren (Contacts) with the same data.

Iftrue(DoesNotContainData([account.parentaccountid] ),
  
  ForEachRecord(    
    FindRecords('account', 'parentaccountid', [account.accountid], 'accountid'),       
   
    ForEachRecordNested(        
      FindRecords('contact', 'parentcustomerid', currentrecord('accountid'), 'contactid'),    
      
      UpdateRecord('contact',                    
        CurrentRecordnested('contactid'),                    
        SetAttribute('address1_line1', [account.address1_line1]),                    
        SetAttribute('address1_line2', [account.address1_line2]),                    
        SetAttribute('address1_line3', [account.address1_line3]),                    
        SetAttribute('address1_city', [account.address1_city]),                    
        SetAttribute('address1_postalcode', [account.address1_postalcode]),                    
        SetAttribute('address1_country', [account.address1_country])
      )
    )
  )
) 



 

 

Parameters

Name Type Description Required
fromdate xxxx xxxx xxxx
todate xxxx xxxx xxxx
interval xxxx xxxx xxxx