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

Remove Item from Browse Gallery

I have a gallery that displays from a collection (coll_GLCodes). I include a button in the gallery to delete each line item (See trash can icon). 

GLCodeDelete.jpg

 

 

The OnSelect function on the Trash Can icon is this: Remove(coll_GLCodes,ThisItem). This worked for me until about 2 days ago. Now clicking the icon on some line items will remove the line item, but does not work for all line items.

 

What am I doing wrong or what changed?

 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Level 10

Re: Remove Item from Browse Gallery

If I understand correctly, you have a gallery with its Items property set to:

coll_GLItems

and inside the gallery is a recycle bin icon which is programmed to remove an individual row using the formula:

Remove(coll_GLCodes,ThisItem)

If the part in red is a typo in your app, then you can just fix it.

 

If it's not a typo, then I am thinking that one or more of your columns do not align by name or by type of data. 

 

For example, I have a collection, coll_example. I shape it when I bind it to a gallery:

Gallery1.Items:
AddColumns(coll_example,"helper_column","")

If I have an icon in the gallery that is designed to remove the record from the collection using "ThisItem," the item in the gallery has an extra column than the collection, so it doesn't think they're the same.

 

Let me know if this helps.

 

Brian

 

__

Microsoft Employee
@8bitclassroom
4 REPLIES 4
mr-dang
Level 10

Re: Remove Item from Browse Gallery

If I understand correctly, you have a gallery with its Items property set to:

coll_GLItems

and inside the gallery is a recycle bin icon which is programmed to remove an individual row using the formula:

Remove(coll_GLCodes,ThisItem)

If the part in red is a typo in your app, then you can just fix it.

 

If it's not a typo, then I am thinking that one or more of your columns do not align by name or by type of data. 

 

For example, I have a collection, coll_example. I shape it when I bind it to a gallery:

Gallery1.Items:
AddColumns(coll_example,"helper_column","")

If I have an icon in the gallery that is designed to remove the record from the collection using "ThisItem," the item in the gallery has an extra column than the collection, so it doesn't think they're the same.

 

Let me know if this helps.

 

Brian

 

__

Microsoft Employee
@8bitclassroom
Jag1
Level: Power Up

Re: Remove Item from Browse Gallery

Hi,

 

I have setup a bardcode scan feature in which I am trying to set the trash icon to remove any barcodes which may be scanned in future by error however my icon is linked as the below but not deleting the line.

 

Remove(BarcodeInfo, ThisItem)

 

Please can you assit

 

Thank you

PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Remove Item from Browse Gallery

@Jag1 ,

Can you start a new post, and make a link to this one to say it's related?

 

I do not want your question to be buried at the end of an old thread.

Dhayalan
Level: Powered On

Re: Remove Item from Browse Gallery

Make sure the Gallery Display mode is "EDIT" not "View" , it will work as expected

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 40 members 4,196 guests
Please welcome our newest community members: