0

I am adding a custom button to the ribbon's settings area for a list through SharePoint designer. My requirement is When user click on the button user has to navigate to another page with currently selected list view name. Is it possible to grab the list view name that user is currently viewing? Eg. SelectedItemId is giving the item id of the currently selected item. But instead of selected item id i want to get the list view name.

  • Which version of SharePoint, and what kind of list? – Mike Smith - MCT - MVP Jul 23 '18 at 17:07
  • SP online with classic version. Custom list – Mihir Jul 23 '18 at 17:11
0

Assuming a simple list in SP 2013 - 2016 (i.e. not the SharePoint Online modern UI), and depending of the view options, the view's name is displayed at the top of the list. Your JavaScript can extract the name, or the view's path and file name.

Screen capture is from SharePoint Online, classic UI...

enter image description here

  • But how i can refer this in my custom action inside SharePoint designer? I don't want JS solution. – Mihir Jul 23 '18 at 17:22
  • Sorry, there's more than one way to create Custom Actions. For a pure SPD only Custom Action, you can only use the built-in placeholders, and none of them include the View name. see here for a list of the URL tokens: (the SPD Custom Action may only support a subset of these) docs.microsoft.com/en-us/sharepoint/dev/general-development/… – Mike Smith - MCT - MVP Jul 23 '18 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.