Per my test, due to the action property is one of the few properties that does not support if expressions. So, it is not possible to make the plus button unclickable when the Registration is full.
As a workaround, you could make the plus button invisible when the Registration is full. Here are codes.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"style": {
"flex-directon": "row",
"justify-content": "left",
"align-items": "center",
"flex-wrap": "nowrap"
},
"children": [
{
"elmType": "div",
"style": {
"display": "=if(indexOf([$PeopleWhoRegistered.email], @me) == -1 && length([$PeopleWhoRegistered]) < [$NumberOfPlaces] && @now <= [$RegistrationEndDate], '','none')",
"flex-directon": "row",
"justify-content": "left",
"align-items": "center",
"flex-wrap": "wrap"
},
"children": [
{
"elmType": "button",
"customRowAction": {
"action": "setValue",
"actionInput": {
"PeopleWhoRegistered": "=appendTo([$PeopleWhoRegistered], @me)"
}
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover",
"title": "Register"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer",
"display": "flex",
"flex-directon": "row",
"justify-content": "left",
"align-items": "center",
"flex-wrap": "wrap"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "AddTo"
},
"style": {
"padding": "0px"
}
}
]
}
]
},
{
"elmType": "div",
"style": {
"display": "=if(indexOf([$PeopleWhoRegistered.email], @me) > -1 && @now <= [$RegistrationEndDate], '','none')",
"flex-directon": "row",
"justify-content": "left",
"align-items": "center",
"flex-wrap": "wrap"
},
"children": [
{
"elmType": "button",
"customRowAction": {
"action": "setValue",
"actionInput": {
"PeopleWhoRegistered": "=removeFrom([$PeopleWhoRegistered], @me)"
}
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover",
"title": "Unregister"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer",
"display": "flex",
"flex-directon": "row",
"justify-content": "left",
"align-items": "center",
"flex-wrap": "wrap"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Blocked12"
},
"style": {
"padding": "0px"
}
}
]
}
]
},
{
"elmType": "div",
"children": [
{
"elmType": "span",
"txtContent": "Registered",
"style": {
"display": "=if([$RegistrationEndDate] > @now && indexOf([$PeopleWhoRegistered.email], @me) > -1, '','none')",
"padding-left": "5px",
"word-break": "keep-all"
}
}
]
},
{
"elmType": "div",
"children": [
{
"elmType": "span",
"txtContent": "- Registration is full",
"style": {
"display": "=if([$RegistrationEndDate] > @now && length([$PeopleWhoRegistered]) >= [$NumberOfPlaces], '','none')",
"padding-left": "5px",
"word-break": "keep-all"
}
}
]
},
{
"elmType": "div",
"children": [
{
"elmType": "span",
"txtContent": "Registration has ended",
"style": {
"display": "=if([$RegistrationEndDate] > @now, 'none','inherit')",
"padding-left": "5px",
"word-break": "keep-all"
}
}
]
}
]
}
Result:
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.