Relationship Field

Schema definition:

import defineField from '@/lib/field/defineField'

defineField({
    id: 'assignedTo'
    name: 'Assigned To',
    type: 'relationship',
    foreignRecordTypeId: 'user',
    defaultValue: [
        'user:xyz'
    ]
})

Format as text

{
    "text": "2 linked records"
}

Change Details

{
    "prev" : [
        "record:a6460e08-fd41-4566-9890-4e85d8a79640",
    ],
    "next" : [
        "record:a6460e08-fd41-4566-9890-4e85d8a79640",
        "record:00c9579c-0ea2-45d1-a713-b922754c9f3f",
    ],
    "userId" : "root",
    "supervisorId" : null,
    "operation" : "add",
    "source" : "user",
    "type" : "relationship",
    "time" : "2023-12-26T09:29:50.411Z"
}

TODO: demo relationship field prev next

  • 2 items added
  • 2 items removed