Hi,
I have made this flow to change the name of the author in the author column of a sharepoint list.
The flow runs but doesn't change anything. What am i doing wrong?
Gr. P
Solved! Go to Solution.
You're not doing anything wrong, as far as I am aware it's not possible to change the author.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
You're not doing anything wrong, as far as I am aware it's not possible to change the author.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Yes it is possible. My flow works now and changes the author or editor field. I had a syntax error in my JSON-code
thank you for your response. Gr .P
Hello Peki72,
Can you please explain in detail that how to Change the author name in the author field in SP List. Can you please also share your corrected JSON format? Thank you
Can you please post your working JSON as I've been struggling with this for months now. Many thanks!
This is the solution:
Gr. P
Thanks @PeKi72 this is really good, but I'm getting a "not well formed JSON" error. Could you possibly copy ad paste the body JSON code up here please so we can copy it (replacing anything you don't want us to see with xxxx). I've made some basic mistake somewhere but can't immediately see it.
Rob
Los Gallardos
{
"formValues":[
{
"FieldName": "Author",
"FieldValue": "[{'Key':'i:0#.f|membership|xxxxxxxxxxxxxx'}]"
},
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|xxxxxxxxxxxxxx'}]"
}
],
"bNewDocumentUpdate": true
}
Gr. P
The xxxx is the email-address from you or another person you which to change the picture from.
The JSON code is for both the Author and Editor. And you have to specify in you Power Automate
flow the Row ID from the Sharepoint list where you want to change the picture. Gr. P
Thanks for sharing your solution.
I was able to get this (and variations in other threads) working for both Author and Editor of a List, however only for Editor for a Library (including Site Pages).
I suspect it's because Author is a read-only field, but then I would expect this to be consistent across both Libraries and Lists? In any case it's beyond my level to resolve, which feels like bitter defeat xD
My use case is that I'm using POST to create site pages from a template, however, this also copies the Author and Created Date of the template. That poor person gets all the "Likes" and "Comments", and I'm trying to set Author to the person who runs the workflow (i.e. the owner of the news post, not the template).
@John1 for the same reason as you I have wanted to change the Author of pages in the Site Pages library. Having tested it yesterday I can say that @PeKi72 's solution does work for the Site Pages library. However, I don't know if this works when you first create the page which is what I think you are trying to do. I suspect it has to be done immediately after the page is created which is what we will be doing via a JSON-formatted button on each item in the Site Pages library.
The flow looks like this:
{
"formValues": [
{
"FieldName": "Author",
"FieldValue": "[{'Key':'i:0#.f|membership|p@{triggerBody()['number']}@xxx.co.uk'}]"
},
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'i:0#.f|membership|p@{triggerBody()['number']}@xxx.co.uk'}]"
}
],
"bNewDocumentUpdate": true
}
The button is shown below, it's a single line of text column:
Format the column in advanced mode and add the following JSON, changing the ID of the flow, the text you want etc.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Change Author to Page Contact",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"50097cde-b800-4c6c-ade9-95be7574f4e5\",\"headerText\":\"Change Author to Contact\",\"runFlowButtonText\":\"Go\"}"
},
"style": {
"background-color": "#cf000f",
"color": "white",
"border-radius": "10px"
}
}
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
i tried this and get no errors with the json flow but author or editor are not being updated in the SharePoint on-line list column
User | Count |
---|---|
87 | |
37 | |
25 | |
13 | |
12 |
User | Count |
---|---|
116 | |
55 | |
36 | |
23 | |
21 |