cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LYNCHJL
Helper II
Helper II

Trying to set Variable to ThisItem.ID in Gallery from Collection Data

Hello,

 

I have an expandable Gallery sorted by Status with data coming from a Collection.  (see attached photo). I am trying to assign MyVar to ThisItem.ID OnSelect. 

 

For some reason the OnSelect is not working.  (Note: When I used a SP List as data source it worked fine.)

 

Gallery Items:

AddColumns(GroupBy((Filter(AllIncidentsUniqueNumber,
User().Email, "Tracker_x0020_All_x0020_Post_x00",
IRF=true,
Year="2020")),
"To_x0020_Do_x0020_List_x0020_Sta","Grouped"),"Sum",CountRows(Grouped))

 

OnSelect =Set(MyVar,ThisItem.ID)

 

I receive a message that OnSelect is Incompatible Type.

 

Thanks for the help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
LYNCHJL
Helper II
Helper II

I was able to fix this by changing the name of MyVar to MyVariable.

View solution in original post

3 REPLIES 3
LYNCHJL
Helper II
Helper II

I was able to fix this by changing the name of MyVar to MyVariable.

View solution in original post

eka24
Super User III
Super User III

How did just changing a variable name solve the issue. We're you having same variable name myvar somewhere?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 .  Yes, MyVar was already defined in my app and didnt match the data type of ThisItem.ID

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,948)