cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Boneckrh19
Level 8

The difference between ThisItem and Gallery.Selected

I am setting a variable on the next arrow of a gallery.

Set(_selectedItem, Gallery.Selected)

When I try to use this variable to refer to a record for deletion, the Remove() function will not accept my variable.

Remove(Entity, _selectedItem)

However if I change my Set() statement to this

Set(_selectedItem, ThisItem)

it does work. Either one appears to work for RemoveIf, and for every other function I have tried. What exactly is the difference between ThisItem and Gallery.Selected that specifically the Remove function would only work with one?

3 REPLIES 3
Community Support Team
Community Support Team

Re: The difference between ThisItem and Gallery.Selected

Hi @Boneckrh19 ,

 

Syntax

Set( VariableName, Value )

  • VariableName - Required. The name of a global variable to create or update.
  • Value - Required. The value to assign to the context variable.

However, Gallery.selected it can be seems as one variable,you can use, Remove(datasource,Gallery.selected)

 

More information:

function-set

 

Hope this could be helpful.

 

Best Regards.

Yumia

Administrator
Administrator

Re: The difference between ThisItem and Gallery.Selected

Thanks for posting in the community @Boneckrh19 - can you review the above reply and advise if it was helpful?

 

@TopShelf-MSFT 

Boneckrh19
Level 8

Re: The difference between ThisItem and Gallery.Selected

I was wondering if there were any differences besides the fact that Remove does not work with Gallery.Selected, and also why that would be the case. This information is not in the documentation.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

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

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

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