okay seems like %profile.id and %profile both work fine.
{
"resourceType": "Appointment",
"writeConstraint": [
{
"language": "text/fhirpath",
"expression": "%before.exists().not() and %profile in %after.participant.actor.reference"
}
]
},
but now I'm getting Forbidden with this. Trying to make an appointment. %after.participant is an array, maybe that's why?