none
Sharepoint Online List View - Column position ordering RRS feed

  • Question

  • Hi,

    Can anyone please guide me how to set column position in View created for a Sharepoint Online List using PnP Powershell ?

    I can't find option for position here :  https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnpview?view=sharepoint-ps



    Thanks,
    Tuesday, November 5, 2019 3:34 PM

All replies

  • Hi v-arvip,

    There is no “position” or “order” property of the SharePoint view, and since the “ViewFields” property return the collection of fields in the list view, so it’s not that straight-forward.

    As a workaround, we could empty the ViewFields property of the current View, sort the fields as you would like to have it, and add it again, one by one, to the ViewFields.

    Here are some similar blogs for your reference:

    Change the fields order in the SharePoint View programmatically

    Changing the order of columns in a list view - PowerShell

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best regards,

    Julie


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, November 6, 2019 7:34 AM
  • hi v-arvip,

    as per my understanding you are trying to change the order of the fields in your list view. you can not pass the column position using set-pnpview, you can simply mention the column names in the order you want - 

    Set-PnPView -List "List Title" -Identity "View Name" -Fields "first","second","Title"(order of the fields.)

    whatever fields and the order you will mention after -Fields will be applied to your list view and your list view settings will be modified automatically.


    K Mohit


    • Edited by KumarMohiT Wednesday, November 6, 2019 4:07 PM
    Wednesday, November 6, 2019 4:06 PM
  • Hi v-arvip,

    I’m checking how the things are going on about this issue. Whether the post helps you?

    You can mark the post as answer if it helps.

    Best regards,

    Julie


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, November 13, 2019 2:10 AM
  • Hi v-arvip,

    Is there any progress on this issue?

    If you find any replies helpful to you, please remember to mark them as answers.

    Thank you for your understanding.

    Best regards,

    Julie


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, November 18, 2019 1:45 AM