cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crjohnson82
Level: Powered On

Delete Items On Screen

I have an PA that goes to a DisplayScreen. 

On the Display screen I have a DisplayGallery  gallery that only shows that ID 

Items: First(Filter('Requests',ID=Value(Param("ID"))))

 

To Edit/Delete you click on the DisplayGallery on the DisplayScreen which navigates you to the EditScreen. 

Where it shows a Form and a Gallery (uses a different list, and display items when ID and MasterID are the same).

 

Form: 

Item: If(!IsBlank(Param("ID")),LookUp('Requests',ID = varID),DisplayGallery.Selected)

 

Gallery:

Items: Filter('Details', MasterID = Value(DataCardValue1.Text))

 

When I delete, I'm using the DisplayGallery.Selected to delete all items on the EditScreen. 

Sometimes it works, sometime it dont. Is there another way so getting the items to delete. 

 

Delete Button on EditScreen

Onselect: 

Remove('Requests','DisplayGallery'.Selected);
RemoveIf('Details', MasterID = 'DisplayGallery'.Selected.ID)
*** 'DisplayGallery' is on the previous screen (DisplayScreen), not EditScreen.  

 

5 REPLIES 5
Super User
Super User

Re: Delete Items On Screen

Hi @crjohnson82 

 

Try Remove('Details',LookUp(Collection1,MasterID='DisplayGallery'.Selected.ID))

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



crjohnson82
Level: Powered On

Re: Delete Items On Screen

@abm 

Tried below. Recieved a error.  Invalid argument type. 

 

Remove('Requests','DisplayGallery'.Selected);
Remove('Details', LookUp(Collection1, MasterID='DisplayGallery'.Selected.ID));

Super User
Super User

Re: Delete Items On Screen

Hi @crjohnson82 

 

You should replace the collection1 with your data collection. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



crjohnson82
Level: Powered On

Re: Delete Items On Screen

@abmI'm new so Im trying to understand. What is the data collection for? What should I be collecting? The master ID or ID?

Community Support Team
Community Support Team

Re: Delete Items On Screen

Hi @crjohnson82 ,

Do you want to delete the item that display in the edir form?

If so, try this formula:

If(!IsBlank(Param("ID")),Remove('Requests',LookUp('Requests',ID = varID)),Remove('Requests',DisplayGallery.Selected))

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,290)