Use Power Automate to move Microsoft Lists items to another list

In this blog post I will show how to use a “button” to “move” an item from one list to another using JSON column formatting. The Create a button to launch a Flow for the selected item JSON code was developed Chris Kent and I have used it to great effect when manual archiving items was required. I am using two copies of the Microsoft Lists Issue Tracker template for my examples. The source list is call “Issue tracker” and the destination list in called “Issue tracker archive”.

Microsoft Lists Issue tracker and Issue tracker archive

Let’s create a simple Flow that will copy the selected row to the destination list. Create a new Flow by clicking “Automate” > “Power Automate” > “See your flows”.

Automate, Power Automate, See your flows

Click “New” > “Instant-from blank”.

Instant from blank

Provide a Flow name, I.e. “Issue tracker – Archive”, select the “For a selected item” trigger and click “Create”.

SharePoint For a selected item

Set the “Site Address” and “List Name” to your source site and list (Issue tracker).

SharePoint For a selected item

Click “New step”, search for “SharePoint” and select the “Get item” action. 

Set the “Site Address” and “List Name” to your source site and list (Issue tracker).

Set “Id” to “ID” from the “For a selected item” trigger.

SharePoint Get item

Click “New step”, search for “SharePoint” and select the “Create item” action. 

Set the “Site Address” and “List Name” to your destination site and list (Issue tracker archive).  Set all other fields to the matching fields from the “Get item” action.

SharePoint Create item

Click “New step”, search for “SharePoint” and select the “Delete item” action. 

Set the “Site Address” and “List Name” to your source site and list (Issue tracker).  

Set “Id” to “ID” from the “Get item” trigger.

SharePoint Delete item

My completed Flow looks like the image below.

My completed Flow

Save and test your Flow by going to the source list, select a list item, click “Automate” and then click “Issue tracker – Archive”. Click “Run flow”

Automate, Issue tracker - Archive

If all goes well the selected item will be created in the destination list and deleted from the source list.

Copied row to archive

Let’s add the “button” to the source list by adding a new “Single line of text” column called “Flow”.

Create column

Copy the JSON the code from Github.

Format the “Flow” column by clicking “Column settings” and then “Format this column”.

Column settings, Format this column

Click “Advanced mode” and paste in the JSON code.

JSON code

Replace the highlighted Flow ID with the ID with your newly created Flow.

  1. Clicking “Automate” > “Power Automate” > “See your flows”.
  2. Click on the “Issue tracker – Archive” Flow.
  3. Copy the ID from the end of the URL, between “flows/” and “/details”

Click “Save” to save your changes.

Now for the cool part. Click the “It’s Flow Time!” button on your source list item and if you copied the Flow ID correctly your “archive” item will execute.

I like this pattern for deferring items for later use where a business process object transitions from one state to another (i.e. short term vs long term) and business rules are applied differently between states.

Thanks for reading.

NY

One thought on “Use Power Automate to move Microsoft Lists items to another list

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s