web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Strange Behaviour Addi...
Power Apps
Unanswered

Strange Behaviour Adding Gallery Item To Collection

(1) ShareShare
ReportReport
Posted on by 795

So my app was working fine, have had 2 days of powerapps and other MS data services dropping out, now i have strange behaviour..

 

I have a gallery that when an item is selected adds the item to a collection.

On a desktop designing in studio this is working perfectly..

On my iphone, strangely..

So I Select an item, and it adds a completely different item..

I cant work out why, every formula is correct, nothing has even changed since i tested a week ago..

Could someone else check this please or advise if they have had some weird behaviour in the last day or so.. just seems too much of a coincidence

Categories:
  • Delid4ve Profile Picture
    795 on at

    So Ive got to the bottom of this..

     

    My Gallery is sorted by a column.  I have an arrow that is set to collect the chosen gallery item into a collection.

     

    What i have found is I cannot use Collect(CollectionName,Gallery.Selected).  It always selects the first item in the list.

     

    Quite wierdly aswell, if i select an item other than the first item, it displays the correct item in a gallery of the collection, however, if i display it in a data table then it displays the first item from the list.

     

    It must be something from the last few day as it was working correctly before the recent outages.

     

    The workaround for now is to change to Collect(CollectionName,Thisitem)

     

    Oh, and using Selected works fine in a browser, the issue is when using the iphone app (not tested on android)

     

    MS Please look at this as something definately not right here.

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Delid4ve,

     

    Using collect won't delete the old record, so if you have selected the first item, then it will be collected in the collection, and the first item would be displayed in the Gallery/Data table.

    If you would like the collection to keep only the selected item, take use of the ClearCollect () function.

    Collect, Clear, and ClearCollect functions in PowerApps

     

    Regards,

    Michael

  • Delid4ve Profile Picture
    795 on at

    It has nothing to do with the collection function.

     

    Using the iphone app, if i press an icon within a gallery that has an on select function, it doesnt select the gallery item.  This behavoiur doesnt occur in a browser.

     

    There is a bug on the iphone app, unsure of android.  Like i said previously, the workaround is to use Thisitem rather than Gallery.Selected

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard