Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Help me fix my JSON

(0) ShareShare
ReportReport
Posted on by 97

Dear Experts,

In my microsoft lists , i really want to format view and also using Json to hide command bar like image as bellow:

CongDuong_0-1685520217425.png

 

1. JSON using to hide Command bar :

 

CongDuong_1-1685520278507.png

2. JSON using format view

CongDuong_2-1685520314167.png

 

This is JSON by text :

 

1. JSON hide commanf bar

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "automate",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "share",
"hide": true
},
{
"key": "integrate",
"hide": true
}
]
}
}

 

2. JSON format view

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"additionalEventClass": {
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
"[$Leave_x0020_type]",
"Annual leave"
]
},
"=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgGreen' , 'sp-css-backgroundColor-BgMintGreen sp-css-color-MintGreenFont')",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
"[$Leave_x0020_type]",
"Other Leave"
]

},
"=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgOrange' , 'sp-css-backgroundColor-BgPeach sp-css-color-PeachFont')",
{
"operator": ":",
"operands": [
{
"operator": "==",
"operands": [
"[$Leave_x0020_type]",
"Business Trip"
]
},
"=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgTeal' , 'sp-css-backgroundColor-BgCyan sp-css-color-CyanFont')+' sp-field-fontSizeSmall'",
""
]
}
]
}
]
}
}

 

 

What i need to do is combined both into one JSON to format view and hide command bar as well.

Cause i don't have knowledge about coding 🙂

Please help me, thanks you all !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard