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.

2
  • Which version of SharePoint, and what kind of list? Commented Jul 23, 2018 at 17:07
  • SP online with classic version. Custom list
    – Mihir
    Commented Jul 23, 2018 at 17:11

1 Answer 1

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

2
  • But how i can refer this in my custom action inside SharePoint designer? I don't want JS solution.
    – Mihir
    Commented Jul 23, 2018 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/… Commented Jul 23, 2018 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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