1. Assume you have 2 forms : “Customer” and “Purchase”
2. In “Purchase” Form, if “CustomerInfo” is a lookup field referring to the “Customer” form, the related fields of the Customer Record (their name, address etc) can be directly accessed from the collection variable.
3. The sample code given below will fetch data from the Customer form
- purchaseInfo = Purchase[ID == input.id];
- info purchaseInfo.CustomerInfo.Last_Name;
- info purchaseInfo.CustomerInfo.First_Name;
- info purchaseInfo.CustomerInfo.BirthDay;
In the above code,
- “purchaseInfo” is the collection variable which holds the records from the Purchase form, based on the specified criteria.
- purchaseInfo.CustomerInfo.Last_Name will fetch the value of the Last_Name field from the “Customer” form based on the lookup