cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 448 members 5,595 guests
Please welcome our newest community members: