Forum Discussion
Tom_Rischkau
May 26, 2023Copper Contributor
Sharepoint Online New Buttons in the Commandbar in Microsoft Sharepoint Lists
Hey guys! When i want to expand my lists with new buttons in the commandbar, is the only way through a new extension? when yes, are there code templates for something like this? i knew about...
- Jul 20, 2021
DavidAz81 I believe I had the same issue using the code found at https://stackoverflow.com/questions/43923102/hover-preview-over-excel-image-link . I had the same problem until a saw a comment when they explained the updated reference. The solution is simple. first use the hyperlink function in your language, but more than this, you need to correct the cell code. in the original post it was "=HYPERLINK(OnMouseOver("http://i.imgur.com/rQ5G8sZ.jpg"),"http://i.imgur.com/rQ5G8sZ.jpg")" but it should be changed to =HYPERLINK(OnMouseOver("http://i.imgur.com/rQ5G8sZ.jpg";A1); "http://i.imgur.com/rQ5G8sZ.jpg")
Any way, i did use it like this. On A column i have the list of hyperlinks (in text such as https://sitename.com/filename.jpg) (A2 is the first image), on B column I use this formula (on B2) I have =HYPERLINK(OnMouseOver(A2;B2);A2) on C column the =HYPERLINK(Reset()) .
in this sample I used the same image link on all cells (lazy me) but it works. . anyway, it is not the best solution yet. I am working on other easier way. this is a screenshot of the sample.
Hope it helps someone.. . the real advantage in this one is that you do not save all pictures in the excel file, as you say, if your list is large it would not be practical, but I think there must be a better way. i have included the sample file, but in case you don't want to download a unknown file, just follow the instructions.
ganeshsanap
May 26, 2023MVP
Tom_Rischkau Yes, it is not possible to add new buttons in the list command bar using JSON formatting.
You have to use the SPFx ListView Command Set extension. Here's the Microsoft official documentation for creating a new extension: Build your first ListView Command Set extension
Here are few SPFx extensions samples on GitHub which can help you to get started with: SPFx extension samples - check the folders named like react-command-
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.