Jun 15 2020 07:49 AM
Hi,
I have one list library where i have one column Called Status and another Status_archive
i want to copy value of status column to status_archive column whenever new item get added to list or any modification in status column value.
how i can do this?using MS flow?
and how i can update old data?
Jun 15 2020 08:41 AM
@rautchetan27 these 2 requests can be done with a couple of very simple flows in Power Automate.
1) When an item is created or modified. That will be your trigger and then you just update the item that was created or modified and into the StatusArchive field you select Status from the dynamic content box:
2) To do this for all existing items in your list, use a trigger of Manually trigger a flow.
By default Get items only returns 100 items, so if your list has more than this go to the settings for the Get items, switch on Pagination and set the threshold to 2000.
Then add a SharePoint Update item action and select the ID and Title from the dynamic content box and then for the Status Archive field select Status as you did at 1) above. As you are entering the fields the action will wrap itself in an apply to each control which is what we want.
The flow will loop through each item in the list and copy the value in each Status column to the StatusArchive column.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jun 16 2020 05:55 AM
Thanks! will it work if both Column type is Choice? will it able to copy choice from one column to another?
Jun 10 2021 09:58 AM
Hey Rob,
I saw this post here with your suggestions and this is something similar to what I am working on . Unfortunately, it's not working out very well for me. This is the fist time I am using Power Automate. I am in the process of recreating my SharePoint Workflows from SharePoint 2010/2013 . With that being said I could use your assistance.
I am following your 1st suggestion here . I have a Project Notes Field that has versioning turned on. I am trying to copy the most recent Project Note to another field called Current Status. Purpose of the Current Status field is so that it will only show the Most Recent version on Notes from the Project Notes field.
Here's what I am doing.
Step 1. When and Item is created or modified
Step 2. Update Item
This is what is happening:
When in the Sharepoint list - I am no longer able to save cause it is locked to a user. So it's not closing out.
In Power Automate I get this warning:
Actions in this flow may result in an infinite trigger loop. Please ensure you add appropriate conditional checks to prevent this flow from triggering itself.
Thanks in advance for your assistance:
Rob Ayala
Jun 11 2021 02:21 AM
@Rob_Ayala you will always end up with an infinite loop with your steps 1 and 2. If you are looking at whether 1 or more specific columns have been changed then your trigger should be "When an item or a file is modified". You then need a "Get changes for an item or a property (properties only)" action and in the Since field add the following expression:
sub(int(triggerOutputs()?['body/{VersionNumber}']),1)
Next add a condition and in the left box select Has Column Changed: Department is equal to true. (you'll select your own column).
Leave the red If no channel empty and in the green if yes channel and an update item and up the other columns that you want updated, i.e not Department in my case.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jun 11 2021 08:50 AM
Rob,
Thank you for your quick response. I really appreciate it.
So I did exactly what you said. Unfortunately, it did not accept the expression. This is what I got.
This is the whole flow....
Thanks,
Rob
Jun 11 2021 09:36 AM
Jun 11 2021 12:33 PM
Hey Rob,
After changing the condition to just state 'true' as the value, I still got the following
Thanks,
Rob
Jun 17 2021 09:30 AM - edited Jun 17 2021 09:31 AM
@Rob_Ayala You need to enter that code in the popup to the right for the Since field, where it says "Expression":
When complete it will look like this:
Jun 17 2021 01:47 PM
Awesome!!! That did it. Thank you @willscarbrough and @RobElliott ....
Thanks again for all your help,
Rob
Aug 02 2021 07:03 AM
@RobElliott can you update a look up column with a single text column?
Aug 02 2021 10:01 AM
Aug 02 2021 12:24 PM