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

Issue with Gallery connected to SharePoint List

Hi all,

      I am having a peculiar issue with a Gallery that has a checkbox on the items, and navigating to a different screen.

 

I have two screens.

 

Screen 1 contains a gallery with a SharePoint list as it's data source.  I have added a 'Checkbox' control onto the gallery so that people can select items from the gallery and the 'OnCheck' property saves the item to a Collection.

 

The problem comes when I click a button on Screen 1 that has the 'OnSelect' property set to Navigate(screen2,transition.none).  When viewing the PowerApp outside the studio, Clicking the button seems to make the Gallery flicker once, then anything that was selected in the Checkbox disappears.  

 

This annoyingly only happens on the first click of the button, if I go back to screen 1 and make some more selections, on second click, the selections stay as expected.

 

Any ideas?

2 ACCEPTED SOLUTIONS

Accepted Solutions
MarcBailey
Level 8

Re: Issue with Gallery connected to SharePoint List

Hi BrettR,

 

I have encountered a similar problem in the past.  I worked with the PowerApps Product Team and it was determined that there is a bug related to the syntax (I spoke with them last week and they are working on a fix): 

 

Gallery.Selected and Gallery.AllItems

 

I had to go back and switch everything to ThisItem.Column and similar workarounds.  Before I did the workarounds I was having problems with OnSelect -- Navigate and other controls where I would have to click the twice before they would work.

 

Let me know if this help.  Thanks, Marc...

View solution in original post

MJOY
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Finally resolved the issue of the disappearing gallery checkboxes!!!!!!!

 

I creating a filtered collection rather than have my Gallery go directly against the SP List...Finally my mis-behaving PowerApp is fully functional.  🙂

View solution in original post

7 REPLIES 7
MarcBailey
Level 8

Re: Issue with Gallery connected to SharePoint List

Hi BrettR,

 

I have encountered a similar problem in the past.  I worked with the PowerApps Product Team and it was determined that there is a bug related to the syntax (I spoke with them last week and they are working on a fix): 

 

Gallery.Selected and Gallery.AllItems

 

I had to go back and switch everything to ThisItem.Column and similar workarounds.  Before I did the workarounds I was having problems with OnSelect -- Navigate and other controls where I would have to click the twice before they would work.

 

Let me know if this help.  Thanks, Marc...

View solution in original post

BrettR
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Cheers Marc! That sounds exactly the same.  I'll test and get back to you 🙂

ofs
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Any updates about this issue? I have almost the same setups and issue here. So far I plan to let users re-check the checkboxes in the list (Because it seems working after moving back to the screen with the gallery).
[UPDATE] When this happens, it seems the gallery still have the old collections which you cannot see visibly since checkboxes are reseted.

I hope I will be able to provide my app without any issue as soon as possible.

 Please let me know if any update or solution for this. Thank you!

MJOY
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Hi Marc,

   Do you know if this issue has been resolved?  I'm experiencing the same issue where my gallery checkboxes disappear when navigating to another screen... my OnSelect statement (updating my collection) is working as expected... unfortunately if clients return to the gallery and update checkbox selection...the gallery is misleading as its been cleared.  I cannot simulate this condition from PowerApps Studio, only from my mobile device.

 

Any assistance would be greatly appreciated.

 

Michael

BrettR
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Gday, I'd probably close this issue now.

 

I believe the problem I was seeing was because I was trying to update the collection 'OnCheck' of a checkbox. 

 

You can avoid the issue of lost checkbox settings, by only populating the collection when you click the next button. 

 

e.g. when you click NEXT, run a 'ForAll' loop on the gallery items and 'ClearCollect' all the items into a collection. 

 

This is a cleaner solution that works well.

MJOY
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Thanks Brett for your response!

 

I'm brand new to Powerapps and this has been so frustrating to address...quite clearly a bug in the product.

 

I changed my logic as suggested from 'OnCheck' and updated the NEXT with the following logic:

 

Clear(Collect_WO_Selected_Tasks);
ForAll(
    Gallery2.AllItems,
       If(Checkbox1.Value=true, Collect(Collect_WO_Selected_Tasks, Checkbox1.Text))
);
Navigate(
    Review_Screen,
    ScreenTransition.Fade
)

After updating the logic, I'm in the exact same place where the Checkboxes continue to disappear...albeit it seems to be only the first time I use the gallery that this is happening, after that the gallery appears to be working as expected.  If you have any other insights or can share your logic (if different than mine) that would be appreciated.

 

All the best,

Michael

 

 

 

MJOY
Level: Powered On

Re: Issue with Gallery connected to SharePoint List

Finally resolved the issue of the disappearing gallery checkboxes!!!!!!!

 

I creating a filtered collection rather than have my Gallery go directly against the SP List...Finally my mis-behaving PowerApp is fully functional.  🙂

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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