cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NickWMAr
Frequent Visitor

Remove record from gallery without removing it from the SharePoint list

Hello,

 

Below is the functionality of a dual submission app I am trying to create:

 

I have a power automate flow that logs a Microsoft Form response from User A in a SharePoint list.

 

My PowerApp takes the first part of the response from this SharePoint list and displays it in a list gallery (called New Requests). User B clicks on the item which takes them to the second submission gallery. User B fills in the missing information and clicks submit. This patches the original SharePoint list with the new information. The submit button navigates to a Completed Requests gallery, which displays the completed data from the SharePoint list.

 

--- Everything works up to this point ---

 

My issue is when the user navigates back to the New Requests gallery, they can still click on the request that was just patched and over-write the data. Is there a way to remove the item from the New Request gallery without removing it from the original SharePoint list? I have tried using the RemoveIf function in the submit button, but that ends up removing the data from the SharePoint list, which removes it from the Completed Requests gallery.

 

Here is the code I used to patch the data in the submit button, along with the RemoveIf function:

 

Set(submittedData, Patch('Data Source', ThisItem, {'Column 1': Value(inputBox1.Text), 'Column 2': inputBox2.Text}); Navigate(detailScreen)); RemoveIf('Data Source', 'Column 1' > 0)

 

Is there a way around this?

 

Thanks,

 

Nick

1 ACCEPTED SOLUTION

Accepted Solutions
ganeshsanap
Super User
Super User

@NickWMAr You should not delete the original SharePoint list item on 2nd submissions/item update.

 

Just filter the items in New Request gallery based on the column in SharePoint list which identifies the request is completed/in progress. 

Example: Consider you have a Status column in your SharePoint list with values In Progress & Completed.

Then set the Items property of New Request gallery to: 

 

Filter(
   SharePointDataSource,
   Status = "In Progress"
)

 

OR if you create Status as a choice field: 

 

Filter(
   SharePointDataSource,
   Status.Value = "In Progress"
)

 


Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

Best Regards,

Ganesh Sanap

Blog site 

View solution in original post

5 REPLIES 5
zmansuri
Memorable Member
Memorable Member

take extra choice type colum in your sharepoint named IsNew. Two Choices. Yes and No. Default will be Yes.

When your flow submits the data to sharepoint IsNew will be Yes. When User B submits the data. Patch teh IsNew to No.

On your New Request gallery. Insert a filter in item code:

Filter(SPList,IsNew.Value="Yes")

 

This way when your flow enters the data it will be visible in new request and user b can select it and attach more data. Once he is done IsNew will be converted to No from Yes. And because of the filter on first gallery it will not show that record in gallery. but it will be available in sharepoint

ganeshsanap
Super User
Super User

@NickWMAr You should not delete the original SharePoint list item on 2nd submissions/item update.

 

Just filter the items in New Request gallery based on the column in SharePoint list which identifies the request is completed/in progress. 

Example: Consider you have a Status column in your SharePoint list with values In Progress & Completed.

Then set the Items property of New Request gallery to: 

 

Filter(
   SharePointDataSource,
   Status = "In Progress"
)

 

OR if you create Status as a choice field: 

 

Filter(
   SharePointDataSource,
   Status.Value = "In Progress"
)

 


Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

 

Best Regards,

Ganesh Sanap

Blog site 

View solution in original post

NickWMAr
Frequent Visitor

Hello,

 

Because lots of data will be uploaded to this SharePoint list, is there any risk using the filter function will slow this screen down? Or is the filter function dealt with on the SharePoint end? Not 100% sure how this works.

 

Thanks,

 

Nick

filter is delegable. It won't affect

NickWMAr
Frequent Visitor

Thank you for the help!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,980)