Sharepoint Capture Last Modified by Before Item Is Modified Again
How to modify SharePoint particular without changing its default columns value
This blog will discuss how we can modify whatever SharePoint listing particular without changing its default columns value.
Hither default columns refer to Created, Created By, Modified, and Modified By. [ID cavalcade cannot be updated]
Apart from the above-mentioned default columns, we can likewise update any custom column using this technique at once.
Why do we need this?
Sometimes, we demand to add some columns and populate data in the alive awarding. But we don't want to affect the original writer, editor, date of cosmos of the detail, and the last modification.
We can straight update the column'south value through SharePoint, Power Apps, or Power Automate (Period), only that will change the Modified By and Modified fields that we want to keep original.
Hence, nosotros utilise the below-mentioned technique to modify the SharePoint Listing particular without changing its default columns value.
Demo
In this demo, I'll utilize a list proper noun "Users" where I have the user'south Starting time Name, Last Name, Date of Birth. Now I desire to add together the user's email without changing its default columns value
Figure 1: SharePoint List without new column
Effigy ii: SharePoint Listing with New email cavalcade
1) Open Power Automate by clicking here and selecting Create from the left pane and then choose Instant Cloud Flow, give your flow a name, select the manual Power Automate trigger, and click on Create.
Figure 3: Power Automate Navigation
Figure iv: Menses proper noun and trigger
two) Add a new step, select Become Items SharePoint action, and select the site accost and list.
Figure v: SharePoint Go Items Action
3) Now add a new step, add Apply to Each activeness, and select the Value dynamic value in the Apply to each action.
Figure 6: Employ to each action
4) Add two etch actions to store the author's and editor's schema from the particular. Refer to the picture below.
Figure 7: SharePoint Particular's Writer
Figure 8: SharePoint Item's Editor
five) We shall form a JSON that we shall use to Mail service data to SharePoint. This JSON data contains two properties (Field Name & Field Value).
In the field name, we will define the Field Name that nosotros desire to change, and in the Field Value, we shall define the value that will patch into the defined field.
Hither we shall too put the internal name of the custom electronic mail field that nosotros want to update.
Figure 9: JSON Array of Fields
In the above flick, we desire to update the E-mail and keep all the system fields the aforementioned equally previous. In the Field Value, we volition use the post-obit expression –
Author: string(outputs('Get_Item_Author'))
Editor: string(outputs('Get_Item_Editor'))
Email: dipak@powersolution.dev [The email that I wanted to update]
Created:formatDateTime(items('Apply_to_each')?['Created'],'yyyy-MM-dd hh:mm:ss')
Modified:formatDateTime(items('Apply_to_each')?['Modified'],'yyyy-MM-dd hh:mm:ss')
six) In this stride, we shall add a new activeness (Transport an HTTP request to SharePoint) to post HTTP asking to SharePoint and follow the below details –
Effigy 10: SharePoint HTTP Request
Site Address: Select the SharePoint site.
Method: Postal service
Uri: _api/web/lists/getbytitle('Users')/items(ID)/validateUpdateListItem
Here, Users is the list proper noun where you want to Mail the data.
ID is the ID dynamic content from above Become Items Action.
Body:
{
"formValues":@{outputs('Form_a_JSON')},
"bNewDocumentUpdate":false
}
Save the menstruum. We volition test the flow by clicking on the Test on the right top corner, selecting the Manual option, and clicking on the Test button. Information technology volition run the flow and add the Electronic mail without modifying the arrangement default columns. Please come across the picture below –
Figure 11: Before the update
Figure 12: After the update
In the above picture, yous tin encounter the Email is updated, and the system columns are the aforementioned every bit previous.
Well, this is the stop of this postal service. You lot tin can add data in a alive SharePoint listing using the to a higher place process without affecting its system columns. Permit me know if you have whatsoever queries or suggestions in the comment below. I will see y'all next time, till then, Happy coding! Contact us to larn more.
========
Follow us:
Source: https://evolvous.com/learn-from-expert/how-to-modify-sharepoint-item-without-changing-its-default-columns-value/
0 Response to "Sharepoint Capture Last Modified by Before Item Is Modified Again"
Post a Comment