“I created the a SharePoint column using the HTTP request, but how do I add it also to a view within the same Power Automate flow?”
If you read the previous solution to create new SharePoint columns, you might feel that something is missing. Even though you created the column, it doesn’t appear in a view. It exists, but it isn’t shown. If you want to add it to a view, even the default one, you still have to go to the SharePoint list and add it manually. Or you could extend the flow.
Add it to the view with an HTTP request
As you might expect, there’s another HTTP request to do that.
Method: POST
Uri: _api/web/lists/GetByTitle('<listName>')/Views/GetByTitle('<viewName>')/ViewFields/addViewField('<columnName>')
Note: <…> are placeholders, replace them including the < and >.
Since it requires the column name, I’d recommend using this request before you rename the column. Create it, add it to the view, and rename it afterwards.
Summary
If you want to also add the newly created SharePoint column to a view, all you need is one extra Power Automate action. Another HTTP request that’ll take the column and add it to the view of your choice. If you’ve got more than one view then just repeat the HTTP request for each of them.
I’m trying to create a new list view with Power Automate, and while I’ve been successful at creating a view, it is not visible in the menu of list views unless I make it the default view. If it’s not the default view, the user cannot see/select it even though the view exists and can be seen at the bottom of the List Settings page. Do you have any idea why this is the case?
Hello Douglas,
it’s been ages since I create a new view using REST API – no idea what wrong.