Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Add columns to SharePoint list

(0) ShareShare
ReportReport
Posted on by

Hi

 

I have seen a few posts on this but none seem to work for me.

 

Here is my flow

 

It creates a list on a site, calls it by the display name of an email address in a form, then it's supposed to start adding columns to the list. No matter how much I try to start adding the columns using the other examples on this and some other forums, it just won't do it.

 

Can anyone see what I'm doing wrong?

 

LukeSykes_0-1689165375085.png

 

 

UPDATE:

 

I may have found the problem, I noticed that the site name in the HTTP request 2 was not the site name of the newly created list. I use a custome address to include the display name but on the site its 'Firstname%20Surname.AllItems.aspx'

 

How do I include the %20?

  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Re: Add columns to SharePoint list

    You only need to do this to use the lists in SharePoint.  You can use the lists in Power Apps and Power Automate without adding the fields to a view.

  • LukeSykes Profile Picture
    on at
    Re: Add columns to SharePoint list

    Thanks for your help

     

    I'm going to have to duplicate the lists manually as I can't see how to integrate this, I've got 155 to do 😞

     

    Looks like i need the view ID which is unique to each list so i cant see how i could obtain that from a list created in the same flow

  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Re: Add columns to SharePoint list

    Its hidden because it hasn't been added to the default view. Here's an article that provides the REST call to add it to the default view.  Using AddViewField in SharePoint Rest API to add multiple columns in list view - SharePoint Stack Exchange

  • LukeSykes Profile Picture
    on at
    Re: Add columns to SharePoint list

    ITS HIDDEN!

     

    After all this time!

     

    So next question, how is it automatically not hidden! haha

  • LukeSykes Profile Picture
    on at
    Re: Add columns to SharePoint list

    Hi

     

    I have actually already removed that wondering if it will just work without.

     

    The flow runs ok, yet still doesn't add the column

     

    LukeSykes_0-1689250735591.png

     

    {
      "d": {
        "__metadata": {
          "id""https://****.sharepoint.com/sites/AnnualLeave-AI/_api/Web/Lists(guid'69347b73-5796-45eb-ac41-de8c88810820')/Fields(guid'1968042a-083c-4d3b-87bd-40af53ba4f9b')",
          "uri""https://****.sharepoint.com/sites/AnnualLeave-AI/_api/Web/Lists(guid'69347b73-5796-45eb-ac41-de8c88810820')/Fields(guid'1968042a-083c-4d3b-87bd-40af53ba4f9b')",
          "type""SP.FieldText"
        },
        "DescriptionResource": {
          "__deferred": {
            "uri""https://****.sharepoint.com/sites/AnnualLeave-AI/_api/Web/Lists(guid'69347b73-5796-45eb-ac41-de8c88810820')/Fields(guid'1968042a-083c-4d3b-87bd-40af53ba4f9b')/DescriptionResource"
          }
        },
        "TitleResource": {
          "__deferred": {
            "uri""https://*****.sharepoint.com/sites/AnnualLeave-AI/_api/Web/Lists(guid'69347b73-5796-45eb-ac41-de8c88810820')/Fields(guid'1968042a-083c-4d3b-87bd-40af53ba4f9b')/TitleResource"
          }
        },
        "AutoIndexed"false,
        "CanBeDeleted"true,
        "ClientSideComponentId""00000000-0000-0000-0000-000000000000",
        "ClientSideComponentProperties"null,
        "ClientValidationFormula"null,
        "ClientValidationMessage"null,
        "CustomFormatter"null,
        "DefaultFormula"null,
        "DefaultValue"null,
        "Description""",
        "Direction""none",
        "EnforceUniqueValues"false,
        "EntityPropertyName""Description",
        "Filterable"true,
        "FromBaseType"false,
        "Group""Custom Columns",
        "Hidden"false,
        "Id""1968042a-083c-4d3b-87bd-40af53ba4f9b",
        "Indexed"false,
        "IndexStatus"0,
        "InternalName""Description",
        "IsModern"false,
        "JSLink""clienttemplates.js",
        "PinnedToFiltersPane"false,
        "ReadOnlyField"false,
        "Required"false,
        "SchemaXml""<Field DisplayName=\"Description\" Type=\"Text\" Required=\"FALSE\" ID=\"{1968042a-083c-4d3b-87bd-40af53ba4f9b}\" SourceID=\"{69347b73-5796-45eb-ac41-de8c88810820}\" StaticName=\"Description\" Name=\"Description\" ColName=\"nvarchar7\" RowOrdinal=\"0\" MaxLength=\"25\" Version=\"1\" />",
        "Scope""/sites/AnnualLeave-AI/Lists/***",
        "Sealed"false,
        "ShowInFiltersPane"0,
        "Sortable"true,
        "StaticName""Description",
        "Title""Description",
        "FieldTypeKind"2,
        "TypeAsString""Text",
        "TypeDisplayName""Single line of text",
        "TypeShortDescription""Single line of text",
        "ValidationFormula"null,
        "ValidationMessage"null,
        "MaxLength"25
      }
    }

     

  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Re: Add columns to SharePoint list

    I don't think the AllItems.ASPX should be on the end of the Site URL.  If you just pick the site out of the dropdown does it add the column?

  • LukeSykes Profile Picture
    on at
    Re: Add columns to SharePoint list

    I don't get an error now, but it still isn't adding the column

     

    Is the field type number incorrect maybe?

  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Re: Add columns to SharePoint list

    The function is 

    encodeUriComponent()
    Yours has a capital E and Uppercase URI, it is case sensitive.
  • LukeSykes Profile Picture
    on at
    Re: Add columns to SharePoint list

    Hi

     

    That doesn't seem to be working for me at all

     

    LukeSykes_0-1689234452593.png

     

    The list is named after the display name of the staff member so I expected it would find it no issue. The first one creates the list and the second one finds the list based on its name (the display name) and adds the columns. What else am I missing?

     

    LukeSykes_1-1689234608065.png

     

  • Pstork1 Profile Picture
    67,060 Most Valuable Professional on at
    Re: Add columns to SharePoint list

    Where you are inserting Display name now just use the Expressions tab to insert the function EncondeURIComponent() with DisplayName as the parameter for the function.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1