Skip to main content

Upsert Team or Group Name

This job was provided by an OpenFn.org user via the job library API.

Metadata

Key Functions

dataValue, field, fields, relationship, upsert

Expression

// Upsert event by unique 'Name'
upsert(
'Event__c',
'CommCare_Case_ID__c',
fields(
field(
'Class_Group_Team__c',
dataValue('form.question_group.group__team_name')
),
relationship('RecordType', 'Name', 'Intervention'),
field(
'CommCare_Case_ID__c',
dataValue('form.case.@case_id')
),
)
);