findAnswersByTarget()
Returns individual form answers for a specific question where the target (the person the form is about) matches a given person, optionally filtered by date range.
This is the answer-level equivalent of findResponsesByTarget() — useful for aggregating scores or values from a single question across all submissions about a specific employee.
Syntax
findAnswersByTarget(question, target[, from][, until])
Parameters
Parameter | Type | Description |
|---|---|---|
question | StringString | Name or ID of the question/field to retrieve answers for |
target | Person | The person the form responses are about |
from | TimestampTimestamp | Starting point of the date range to traverse (inclusive) |
until | TimestampTimestamp | Ending point of the date range to traverse (exclusive) |
Return Type
ListList <FormAnswerFormAnswer>
Examples
findAnswersByTarget('managerReviewRating', person, '-365d').mean{answerValue}
Returns the average manager review rating given about the current person in the past year.
findAnswersByTarget('peerFeedbackImpactRating', person, '-180d').count()
Counts the number of peer feedback impact ratings submitted about the current person in the past 6 months.
