Forum Discussion

francescjp's avatar
francescjp
Brass Contributor
Jan 07, 2023

Avoid editing columns on edit mode on sharepoint list

Hello:

 

I have created a list where users can ask for a new Teams team to be created. The fields of that list are:

 

- Name of new Teams team

- Users that will belong to that team.

 

When user creates a new item both fields must be enabled and can be written.

If later user wants to add or delete any user from users list, the name of the team must be in readonly mode. I don't want that Name can be edited once created.

 

How can I accomplish that? Could be applied to more fields, in the same list, if it grows in the future?

 

Thanks in advance.

 

Francesc

  • SvenSieverding's avatar
    SvenSieverding
    Bronze Contributor

    Hi francescjp ,


    for a dirty fix:

    You could create a calculated column that just displays the team name.
    Then hide the original team name in the edit-dialog with the conditional formula.

    =if([$ID], 'true', 'false')

    And finally remove the team name field from the view and add calculated column. That way you won't be able to edit the field in grid view.


    But i think that you are mixing two processes into one here.

    I personally would do this:

    1. Create two lists: One for requesting a team and one for requesting team membership.
    2. Then I would create a lookup in the membership list to the teams list.
    3. Change permissions on the lists so that users can only add new items and display items, but not edit items.
    4. Have your users create a new entry in the membership list every time they want to change somthing. Perhaps even make them enter a comment as a required field.

    That makes it much easier to see which user requested which user's membership. And you see when that happened.

    Best Regards,
    Sven

    • francescjp's avatar
      francescjp
      Brass Contributor

      Hello Sven:

       

      I like dirty way. The Team column is a lookup one. I am not able to use it in a calculated column?

      You know if it's possible to use a lookup column in calculated column?

       

      Thank you very much.

       

      Francesc

      • SvenSieverding's avatar
        SvenSieverding
        Bronze Contributor

        francescjp 

        Mhmm..... You cannot use a lookup column in a calculated column, so this is no longer an option.


        We needed the calculated column so that your users cannot easily edit the value in grid view.


        So now you need to disable grid view capabilities.
        You can do so by selecting

        • Gear
        • -> List/Library Settings
        • ->Advanced Settings
        • ->Allow items in this document library to be edited using Quick Edit and the Details Pane?
          -> No

        Best Regards,
        Sven

Resources