Default value for the custom column which set by SharePoint REST API does not show on the document library when upload a file

Yuri 20 Reputation points
2024-10-30T19:51:07.2033333+00:00

Default value for the custom column which set by SharePoint REST API does not show on the document library when upload a file

Here are the steps to reproduce the issue:

  1. Create a new Modern team site collection not connected to M365 group by using PowerShell command ( New-PnPSite -Type TeamSiteWithoutMicrosoft365Group).
  2. Create a new list in the new site and open list settings. Advanced settings -> Select Yes to Allow management of content types and OK.
  3. At the settings page, select Add from existing site content types from Content Types.
  4. Add a custom content type and select OK. This will add custom columns in the Columns section at the settings page.
  5. Create a new document library and add custom columns you created at the step 4.
  6. Set the default value for the column by using SharePoint REST API.

JobNumber

It will set the default value; however, when upload a file to the document library, the default value does not show.

The default value will only show with following manual steps after the step 6.

Go to Site Columns -> Edit Column for the custom columns and click OK button without changing anything. The below dialog pops up and click OK.

dialog

Is there anything I can do in order to show the default value without any manual steps?

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. AllenXu-MSFT 24,981 Reputation points Moderator
    2024-10-31T05:58:24.3+00:00

    Hi @Yuri,

    I can also reproduce this issue. It seems that it is caused by the Power Automate flow. I suggest you post in this dedicated forum: https://community.powerplatform.com/forums/thread/?groupid=46ce02a3-e1a7-4176-81fc-d93a4001d287. Experts actively monitors cases there.


    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.


0 additional answers

Sort by: Most helpful

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.