Forum Discussion
How to edit existing Sharepoint Document Library with SPFx
- Oct 30, 2023
You can definitely add more than 2 buttons or more than 2 nested if conditions in JSON formatting expressions.
For example, I have used more than 200 nested if conditions here: SharePoint Online: Display Country Flags using JSON Formatting – multiple selections
Also, you can show/hide buttons in JSON formatting based on existing column values with the help of display CSS property.
For customizing list/library forms, you can either use Power Apps (low code solution) or using SPFx form customizer (coding experience required).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap
First of all thank you for your extensive reply! Really appreciate it. To address some of your questions:
1. As for manipulating the view I'm trying to solve this issue that I previously inquired about at the https://powerusers.microsoft.com/t5/Building-Power-Apps/Edit-form-when-uploading-a-new-document/m-p/2400781#M599173
2. As for the buttons, for example I have a button that has 3 states based on the flow with different text and color:
From my understanding the JSON formatting can only handle 2 versions with the if statement. I tried adding a third state but this was unsuccesful. I also kind of need to 'disable' buttons, meaning that once an user has clicked on the TEXT 1 button it should be non clickable. I now use a different cursor but users can still technically click on it and start the flow again.
You can definitely add more than 2 buttons or more than 2 nested if conditions in JSON formatting expressions.
For example, I have used more than 200 nested if conditions here: SharePoint Online: Display Country Flags using JSON Formatting – multiple selections
Also, you can show/hide buttons in JSON formatting based on existing column values with the help of display CSS property.
For customizing list/library forms, you can either use Power Apps (low code solution) or using SPFx form customizer (coding experience required).
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.