SOLVED

Can I do this with SPFx extensions?

%3CLINGO-SUB%20id%3D%22lingo-sub-612637%22%20slang%3D%22en-US%22%3ECan%20I%20do%20this%20with%20SPFx%20extensions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-612637%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20wondering%20if%20is%20it%20possible%20to%20create%20a%20SPFx%20extension%20to%20show%20buttons%20in%20the%20body%20of%20a%20page%3F%3C%2FP%3E%3CP%3EI%20know%20that%20there%20is%20top%20and%20bottom%20placeholder%20and%20I%20saw%20som%20samples%20showing%20buttons%20on%20the%20%22ribbon%22%20to%20interact%20with%20a%20list.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20want%20to%20do%20is%20create%20a%20page%20containing%20a%20list%20with%20some%20views%20and%20place%20some%20buttons%20in%20the%20same%20page%20to%20choose%20the%20views.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20that%20be%20done%20with%20extensions%20or%20is%20only%20webpart%20that%20can%20do%20that%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3CP%3EAmerico%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-612637%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-615446%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20I%20do%20this%20with%20SPFx%20extensions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-615446%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117034%22%20target%3D%22_blank%22%3E%40Americo%20Perez%3C%2FA%3E%26nbsp%3BThere%20isn't%20a%20supported%20method%20to%20do%20what%20you%20are%20trying%20to%20do.%20Users%20can%20change%20list%2Flibrary%20views%20using%20the%20web%20part.%20What%20exactly%20are%20you%20trying%20to%20achieve%20that%20can't%20be%20done%20with%20the%20out%20of%20the%20box%20web%20parts%3F%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-637666%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20I%20do%20this%20with%20SPFx%20extensions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-637666%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3B%2C%20As%20you%20can%20see%20in%20this%20image%20what%20I%20am%20trying%20to%20do%20is%20place%20buttons%20on%20the%20same%20page%20where%20the%20webpart%20shows%20the%20list.%20The%20idea%20of%20the%20buttons%20is%20to%20change%20the%20list's%20views.%20I%20know%20that%20there%20is%20a%20dropdown%20in%20the%20webpart%20that%20can%20do%20that%2C%20but%20I%20would%20like%20to%20use%20this%20kind%20of%20buttons%20to%20make%20clear%20that%20the%20user%20can%20browse%20another%20views.%20We%20have%20som%20users%20that%20miss%20the%20dropdown%20in%20the%20webpart%20and%20I%20think%20that%20it%20could%20be%20easer%20for%20them%20if%20I%20put%20some%20buttons%20instead.%26nbsp%3B%3C%2FP%3E%3CP%3EEach%20button%20should%20be%20linked%20to%20a%20view%20and%20when%20the%20user%20click%20on%20them%20the%20list%20should%20load%20the%20selected%20view.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F115805iF52984BFFFB9B1A3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Ska%CC%88rmavbild%202019-05-23%20kl.%2014.28.55.png%22%20title%3D%22Ska%CC%88rmavbild%202019-05-23%20kl.%2014.28.55.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3CP%3EAmerico%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-637805%22%20slang%3D%22en-US%22%3ERe%3A%20Can%20I%20do%20this%20with%20SPFx%20extensions%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-637805%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F117034%22%20target%3D%22_blank%22%3E%40Americo%20Perez%3C%2FA%3E%26nbsp%3BSo%20you%20may%20want%20to%20look%20into%20Dynamic%20Data%20for%20SPFx%20and%20build%20your%20solution%20for%20this.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fdynamic-data%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fdynamic-data%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EPersonally%2C%20I%20think%20it's%20a%20lot%20of%20technical%20debt%20to%20add%20for%20something%20that%20should%20be%20solved%20with%20training.%20While%20your%20end%20users%20may%20be%20missing%20the%20drop%20down%2C%20this%20is%20likely%20because%20they%20aren't%20trained%20enough%20to%20work%20with%20SharePoint%20(specifically%20lists).%20In%20my%20opinion%2C%20before%20investing%20so%20much%20into%20custom%20solutions%2C%20I%20would%20make%20sure%20all%20the%20end%20users%20have%20solid%20training%20workshops%20for%20the%20environments%20they%20are%20working%20in.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

Hi,

I am wondering if is it possible to create a SPFx extension to show buttons in the body of a page?

I know that there is top and bottom placeholder and I saw som samples showing buttons on the "ribbon" to interact with a list. 

 

What I want to do is create a page containing a list with some views and place some buttons in the same page to choose the views. 

 

Can that be done with extensions or is only webpart that can do that?

 

Best regards

Americo

3 Replies
Highlighted

@Americo Perez There isn't a supported method to do what you are trying to do. Users can change list/library views using the web part. What exactly are you trying to achieve that can't be done with the out of the box web parts?


Highlighted

Hi @Beau Cameron , As you can see in this image what I am trying to do is place buttons on the same page where the webpart shows the list. The idea of the buttons is to change the list's views. I know that there is a dropdown in the webpart that can do that, but I would like to use this kind of buttons to make clear that the user can browse another views. We have som users that miss the dropdown in the webpart and I think that it could be easer for them if I put some buttons instead. 

Each button should be linked to a view and when the user click on them the list should load the selected view. 

 

Skärmavbild 2019-05-23 kl. 14.28.55.png

 

Best regards

Americo

Highlighted
Best Response confirmed by Americo Perez (Regular Contributor)
Solution

@Americo Perez So you may want to look into Dynamic Data for SPFx and build your solution for this. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data

Personally, I think it's a lot of technical debt to add for something that should be solved with training. While your end users may be missing the drop down, this is likely because they aren't trained enough to work with SharePoint (specifically lists). In my opinion, before investing so much into custom solutions, I would make sure all the end users have solid training workshops for the environments they are working in.