How to set default column values to overwrite

Josep C. Artigas 0 Reputation points
2023-06-27T10:37:55.78+00:00

Hi, I have the issue that when I set a default column value for a specific folder it's only applying this default value if the column attribute of the file I add to the folder is blank. If the file is having already a value in the column it's not overwriting it. How can I set it in a way that even when the files have already a value in these columns they are overwritten with the default value?

 

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,881 Reputation points
    2023-06-30T10:01:48.97+00:00

    Hi Josep C. Artigas

    Currently, this is a default behavior that does not override to default values for values that already exist.

    Another alternative option I can give is using column formatting with JSON to set the value of that column to the default value you set, which can keep the value of the column at the default value, but only change the style, not for the real property, and only work for this view.

    Hope this helps. Best Wishes.

    {
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "a",
    "txtContent": "1",
    "attributes": {
    "target": "_blank"
    }
    }
    

    image (2)

    image (3)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.