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

Roll back SPO List on the "Rejected" status

I have a custom Power Apps approval application, where the status is changed when submitting by a user.

The status is: Requested, Approval Pending, Approved, Rejected, Work Completed.

Now when 'Work Completed' is shown, the request has been all done. But when the requesting user would like to change a field, he/she can redo the request by changing the status from 'Work Completed' to 'Approval Pending'.

The problem is when the redone request is rejected, the request cannot be set to the original state because the requesting user already change the field when seeking the approval.

How can I set the rejcted request to the state of the original SPO list items?

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @nobu ,

 

There are a lot of blogs that about using flow to restore previous versions of SharePoint list items:

https://manueltgomes.com/microsoft/powerautomate/how-to-get-previous-versions-in-sharepoint/

https://www.catapultsystems.com/blogs/get-previous-versions-of-sharepoint-list-items-in-flow/

https://www.c-sharpcorner.com/article/getting-version-history-of-sharepoint-list-item-using-power-au...

 

However, you could see this will be a long process to achieve the small goal. So I would recommend to change some scenarios in the App as well as in SharePoint setups:

1. Within SharePoint Online, create and restrict views for common users of the list, for example a "Not Completed" view for users to edit items that are not completed, once item is completed common users will not be able to find it in the list:

https://www.netwoven.com/2016/01/21/how-to-set-view-level-permission-for-a-listlibrary-in-sharepoint...

 

2. Within Power Apps, show list items that are not completed for users to edit and request based on user groups. If you have a Gallery within your App that displays all the list items, then you could use Filter function to hide the completed items form the specific groups. You could create a users list in SharePoint to maintain the user roles and use in Power Apps as the role base as well.

https://svaghub.com/2018/11/03/role-based-security-in-powerapps-using-spgroups/

https://www.youtube.com/watch?v=J-hMMXrKMVE

 

With above combined, the best approach I can see is using a user role list with columns of Name, Email, User role, Status and so on, check user roles based on this list when user logging in to Power Apps then restrict list items.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @nobu ,

 

There are a lot of blogs that about using flow to restore previous versions of SharePoint list items:

https://manueltgomes.com/microsoft/powerautomate/how-to-get-previous-versions-in-sharepoint/

https://www.catapultsystems.com/blogs/get-previous-versions-of-sharepoint-list-items-in-flow/

https://www.c-sharpcorner.com/article/getting-version-history-of-sharepoint-list-item-using-power-au...

 

However, you could see this will be a long process to achieve the small goal. So I would recommend to change some scenarios in the App as well as in SharePoint setups:

1. Within SharePoint Online, create and restrict views for common users of the list, for example a "Not Completed" view for users to edit items that are not completed, once item is completed common users will not be able to find it in the list:

https://www.netwoven.com/2016/01/21/how-to-set-view-level-permission-for-a-listlibrary-in-sharepoint...

 

2. Within Power Apps, show list items that are not completed for users to edit and request based on user groups. If you have a Gallery within your App that displays all the list items, then you could use Filter function to hide the completed items form the specific groups. You could create a users list in SharePoint to maintain the user roles and use in Power Apps as the role base as well.

https://svaghub.com/2018/11/03/role-based-security-in-powerapps-using-spgroups/

https://www.youtube.com/watch?v=J-hMMXrKMVE

 

With above combined, the best approach I can see is using a user role list with columns of Name, Email, User role, Status and so on, check user roles based on this list when user logging in to Power Apps then restrict list items.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,197)