Per my test, you could only achieve one requirement once, cannot achieve two requirements at the same time.
1.When [SelectionMode = NoSelection], I want to hide the "Automate" button.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "automate",
"selectionModes": [
"NoSelection"
],
"hide": "true"
}
]
}
}
2.When [SelectionMode = SingleSelection], I want to show the "Automate" button and set the text to "My Automate Start".
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "automate",
"text": "My Automate Start",
"selectionModes": [
"SingleSelection"
],
"hide": "false"
}
]
}
}
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.