Forum Discussion
Modify a "Created By" Sharepoint List Column
Hi Team,
I have a sharepoint list with a column "Created By". This is a default column created automatically with the list.
I want to create a flow to add the name who appears in this column by the name of the person who trigger the flow (triggerBody()?['Author/DisplayName']). The problem is this column doesn't appear in the options. Do you know if there is a way to modify this kind of sharepoint column with Power Automate ? (this is the same for columns "Created", "Modify"&"Modify By")
Many thanks
jtsables by default the Created By column is read-only but you can change it with the following flow which is triggered from a button in the SharePoint list/library.
The Uri field is
_api/web/lists/getByTitle('Site Pages')/items(ID)/validateUpdateListItemand the Body field is
{ "formValues":[ { "FieldName": "Author", "FieldValue": "[{'Key':'i:0#.f|membership|{OWNER EMAIL}@wsp.com'}]" }, { "FieldName": "Editor", "FieldValue": "[{'Key':'i:0#.f|membership|{OWNER EMAIL}@wsp.com'}]" } ], "bNewDocumentUpdate": true }Then create a single line of text column in your SharePoint list and format it in advanced mode with the following JSON, changing the flow ID to your flow and other parameters as necessary.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "Change Created By", "customRowAction": { "action": "executeFlow", "actionParams": "='{\"id\":\"5eddbaca-e7df-46f4-b968-f009ed9f69ec\", \"headerText\":\" ' + [$Title] + '\",\"runFlowButtonText\":\"Go\"}'" }, "style": { "background-color": "#fff5dd", "border-radius": "10px" } }Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
3 Replies
- Rob_ElliottSilver Contributor
jtsables by default the Created By column is read-only but you can change it with the following flow which is triggered from a button in the SharePoint list/library.
The Uri field is
_api/web/lists/getByTitle('Site Pages')/items(ID)/validateUpdateListItemand the Body field is
{ "formValues":[ { "FieldName": "Author", "FieldValue": "[{'Key':'i:0#.f|membership|{OWNER EMAIL}@wsp.com'}]" }, { "FieldName": "Editor", "FieldValue": "[{'Key':'i:0#.f|membership|{OWNER EMAIL}@wsp.com'}]" } ], "bNewDocumentUpdate": true }Then create a single line of text column in your SharePoint list and format it in advanced mode with the following JSON, changing the flow ID to your flow and other parameters as necessary.
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "Change Created By", "customRowAction": { "action": "executeFlow", "actionParams": "='{\"id\":\"5eddbaca-e7df-46f4-b968-f009ed9f69ec\", \"headerText\":\" ' + [$Title] + '\",\"runFlowButtonText\":\"Go\"}'" }, "style": { "background-color": "#fff5dd", "border-radius": "10px" } }Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)- jtsablesCopper Contributor
Thank you very much for this way of doing which works very well.
However with this flow, every time someone edits an item, I have to manually enter that person's name.
I have a flow that isolates modifications made on a first spo list into a 2nd spo list. My goal would be to automatically update the 'Modified By' (or 'Created By') column of the 2nd spo list with the name of the person who made the modification (instead of the name of the author of the flow which is currently me)
Is there a way to do this automatically and integrate with my existing flow?