I have a repeating section that collects contact information for ticket orders. In a calculated field outside of the repeating section (TicketOrders), I want to use the "Name" field of the first contact provided in the repeating section. The documentation describes "First()" will "Returns the first item in a repeating section or table." I've tried the calculation =Form.TicketOrders.First(Name.FirstAndLast), but get "No applicable aggregate method 'First' exists at character 18". Is there a bug here, or am I doing something wrong?
Cognito-forms – Cognito Forms: Referencing a field in a repeating section
cognito-forms
Related Topic
- Cognito-forms – Cognito Forms: Reveal section based on Boolean field response
- Cognito-forms – Dynamic Field Values in Cognito Forms
- Cognito-forms – Cognito Forms: Fill date field with previous Date field
- Cognito Forms – Calculating Number of Selected Checkboxes in Repeating Section
- Cognito-forms – No applicable aggregate method “Sum” exists at character 22 in Cognito Forms
- Cognito-forms – Custom repeating section in Cognito Forms
- Cognito-forms – Discount calculation
Best Answer
If you want to pull the value of a specific field from within a repeating section in Cognito Forms, I recommend using a combination of Where() in conjunction with Select(), as follows:
=Form.TicketOrders.Where(ItemNumber = 1).Select(Name.FirstAndLast)
This will allow you to pull data from specific items in the list.
https://www.cognitoforms.com/support/51/calculations/repeating-sectionstables