cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Deleting collection row in gallery after popup validation

Happy friday everyone!

I have trouble deleting a selected record in collection in a gallery browser after popup validation window.

I have carefully followed the guide from https://www.youtube.com/watch?v=SaDEVOgOlYY and https://www.youtube.com/watch?v=TjKmL0v6GlI, but neither seems to work.

It seems like the only way for me to delete a record in my collection in a gallery is through this syntax

 

 

Remove(collection, ThisItem)

 

 

I have tried this one, but it does not the delete the record...:

 

Remove(collection,Gallery.Selected)

 



However if I want to use a Popup validation window, i need to use "Remove(collection, gallery.selected) to delete the selected record. But this syntax does not delete the row for me.

 

 

Remove(Collection, gallery.Selected);UpdateContext({varShowPopup:false});Back()

 

 

 

image.png
Can anyone help me with deleting a record in a collection after a popup validation window?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Deleting collection row in gallery after popup validation

@ajazz
The reason it’s not working is because when you click the garbage can icon the record underneath is not selected. Selecting in a gallery is the result of triggering the gallery’s OnSelect property. Here you are triggering OnSelect of the icon.

We can try a different approach. Include this code in the OnSelect property of your garbage icon.

Set(recordDeleteID,ThisItem);

Then put this code in the pop up confirmation OK button OnSelect property.

Remove(collection, recordDeleteID);

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Deleting collection row in gallery after popup validation

@ajazz
The reason it’s not working is because when you click the garbage can icon the record underneath is not selected. Selecting in a gallery is the result of triggering the gallery’s OnSelect property. Here you are triggering OnSelect of the icon.

We can try a different approach. Include this code in the OnSelect property of your garbage icon.

Set(recordDeleteID,ThisItem);

Then put this code in the pop up confirmation OK button OnSelect property.

Remove(collection, recordDeleteID);

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Deleting collection row in gallery after popup validation

@mdevaneyThank you! It works 🙂

You are definitely the MVP (most valuable poster) here on this forum!

Highlighted
Super User
Super User

Re: Deleting collection row in gallery after popup validation

@ajazz
Thank you for the kind words. Best of luck building your app.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,434)