cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Move Sharepoint Item to a second list

I would like to have a trigger (when user moves status from 'In Progress' to 'Submit') that the item goes through approval cycle and if approved then the entire sharepoint list item moves to a second sharepoint list (called 'Approved Data') and the original item is deleted from the original list.  I need to lock down my list data so there is no additional editing once the approval process happens.  The second list is visible to few people in charge of securing the data where the original list is entry point for all members to submit patient information into the list. 

 

List Items:

Patient Name

Date of Birth

Age

Chief Compliant

HPI

Status (In Progress, Submit, Approved)

 

Thank you kindly for your help,

Matthew

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Hi @mpalilonis,

 

I tried to replicate your requirements and came up with a Flow solution that may work for you. One thing I should mention is that I took the liberty of creating the columns as the type I saw fit for this. For example, for Patient Name, I just use the Title column and for both Chief Compliant and HPI, I used the Single line of text column type. Also, for the sake of checking Flow conditions, I added a Rejected choice to the Status column.

 

Here's the list architecture:

  • Title/Patient Name (Single line of text)
  • Date of Birth (Date and Time)
  • Age (Single line of text)
  • Chief Compliant (Single line of text)
  • HPI (Single line of text)
  • Status (Choice)
    • In Progress
    • Submit
    • Approved
    • Rejected

For the Flow steps, for the trigger I used the "When an item is created or modified" since they no longer have the "When an item is modified" trigger. After that, I added a condition to check if the Status value is equals to Submit since you don't want to the Flow to trigger until the correct Status is selected. Below you can see the Condition step on both Basic and Advanced Edit Mode.
Condition on Basic Edit ModeCondition on Basic Edit ModeCondition on Advanced Edit ModeCondition on Advanced Edit Mode

If the Condition result is false, the Flow just stops, but if it's true, then it moves to the "Send approval email" step. In this step, I set the User Options to Approve and Reject.User OptionsUser Options

At this point the Flow will wait until the Approval is complete. Once the approver completes the process, another Condition runs and checks if the selected option is equals to Approve. Below you can see the Condition 2 step on both Basic and Advanced Edit Mode:
Basic Edit ModeBasic Edit ModeAdvanced Edit ModeAdvanced Edit Mode

Also, in case you wonder where the "SelectedOption" came from, it comes from the "Send approval email" step. See the screenshot below for more info.
SelectedOptionSelectedOption

If the Condition 2 result is true, the Status will be to Approved on the original item via the "Update item" step. Once the original item is updated, a new item will be created via the "Create item" step in the Approved Data list with the same info from the original item. And once the new item is created, the original item will be deleted via the "Delete item" step. The screenshot below shows the complete sequence:
MoveDelete-8.JPG

Now, if the Condition 2 result is false, I set a "Send email step" to the Modified By person to let him/her know the list item has been Rejected. Right after that, the item Status is set to Rejected via the "Update item 2" step and then the Flow stops. See the screenshot below:
MoveDelete-9.JPG

 

All the steps above worked for me, and hopefully they will work for you. As for locking down the items while they are waiting for approval, I don't know of any way of doing this out of the box unless you either create a form in PowerApps or create a custom form with HTML and JavaScript.

 

Please let me know if you have any questions or need help.

 

Regards,

Fausto Capellan, Jr

 

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

View solution in original post

3 REPLIES 3
Highlighted
Memorable Member
Memorable Member

Hi @mpalilonis,

 

I tried to replicate your requirements and came up with a Flow solution that may work for you. One thing I should mention is that I took the liberty of creating the columns as the type I saw fit for this. For example, for Patient Name, I just use the Title column and for both Chief Compliant and HPI, I used the Single line of text column type. Also, for the sake of checking Flow conditions, I added a Rejected choice to the Status column.

 

Here's the list architecture:

  • Title/Patient Name (Single line of text)
  • Date of Birth (Date and Time)
  • Age (Single line of text)
  • Chief Compliant (Single line of text)
  • HPI (Single line of text)
  • Status (Choice)
    • In Progress
    • Submit
    • Approved
    • Rejected

For the Flow steps, for the trigger I used the "When an item is created or modified" since they no longer have the "When an item is modified" trigger. After that, I added a condition to check if the Status value is equals to Submit since you don't want to the Flow to trigger until the correct Status is selected. Below you can see the Condition step on both Basic and Advanced Edit Mode.
Condition on Basic Edit ModeCondition on Basic Edit ModeCondition on Advanced Edit ModeCondition on Advanced Edit Mode

If the Condition result is false, the Flow just stops, but if it's true, then it moves to the "Send approval email" step. In this step, I set the User Options to Approve and Reject.User OptionsUser Options

At this point the Flow will wait until the Approval is complete. Once the approver completes the process, another Condition runs and checks if the selected option is equals to Approve. Below you can see the Condition 2 step on both Basic and Advanced Edit Mode:
Basic Edit ModeBasic Edit ModeAdvanced Edit ModeAdvanced Edit Mode

Also, in case you wonder where the "SelectedOption" came from, it comes from the "Send approval email" step. See the screenshot below for more info.
SelectedOptionSelectedOption

If the Condition 2 result is true, the Status will be to Approved on the original item via the "Update item" step. Once the original item is updated, a new item will be created via the "Create item" step in the Approved Data list with the same info from the original item. And once the new item is created, the original item will be deleted via the "Delete item" step. The screenshot below shows the complete sequence:
MoveDelete-8.JPG

Now, if the Condition 2 result is false, I set a "Send email step" to the Modified By person to let him/her know the list item has been Rejected. Right after that, the item Status is set to Rejected via the "Update item 2" step and then the Flow stops. See the screenshot below:
MoveDelete-9.JPG

 

All the steps above worked for me, and hopefully they will work for you. As for locking down the items while they are waiting for approval, I don't know of any way of doing this out of the box unless you either create a form in PowerApps or create a custom form with HTML and JavaScript.

 

Please let me know if you have any questions or need help.

 

Regards,

Fausto Capellan, Jr

 

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

View solution in original post

Highlighted
Anonymous
Not applicable

Does the second list need to be created before hand or can Flow creates at the spot?

Highlighted

Hi @Anonymous 

 

The second list needs to be created beforehand. You can have Flow created on the spot, but that's a different process not outlined in this solution.

 

Regards,

Fausto Capellan, Jr

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,459)