cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NickK
Helper I
Helper I

iOS only Bug Report: Clearcollect & Navigate bug

First thing, the following bug is not present when the app is opened on the web browser or on Android, iOS only. 

 

My App operates by populating a table called "MyRecord" with the selected record in the gallery view, the function then naviates the to the next screen (Screen3). 

 

All of the values reference the MyRecord table and it's one record to pull the data about that record. 

 

The Issue:

 

When using iOS, the record that shows up when you click on an item in the gallery view is always 1 record behind. If you go back and tap on the gallery item again you will get the correct record. 

 

There seems to be a bug on iOS with the ClearCollect function. 

 

Please have a look at this issue and advise. 

 

Here is my function for the OnSelect in the gallery view to get to the detail view

ClearCollect(MyRecord,Gallery1.Selected);Navigate(Screen3,ScreenTransition.Fade)

 

Thanks, Nick

1 ACCEPTED SOLUTION

Accepted Solutions

after doing some additional digging in the forums i was to find the solution using this post:

https://powerusers.microsoft.com/t5/PowerApps-Forum/Gallery-cache-issue-on-iOS/m-p/61729#M25500

 

Ultimately using:

ClearCollect(MyRecord,ThisItem);Navigate(Screen3,ScreenTransition.Fade)

instead of this:

ClearCollect(MyRecord,Gallery1.Selected);Navigate(Screen3,ScreenTransition.Fade)

 on the navigation object fixed ths bug. 

View solution in original post

5 REPLIES 5
v-micsh-msft
Community Support
Community Support

Hi @NickK,

 

Thanks for the feedback, could you please share a screenshot of where you ocnfigured the Onselect property?

Based on your description, you have configured the ClearCollect () function for a control within the Gallery, and when the action performs, the proper item in the gallery is not chosen as the selected one, right?

55.PNG

If that is, then the Gallery.selected value performs correctly under IOS device per my testing.

 

By default, the first item is the Gallery.Selected if user has not choose any item within the gallery.

If you configured the OnSelect property with a control outside of the gallery, then please consider move the control into the Gallery, see if that would make any difference.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the response Michael, 

 

Yes, no matter what you select the first time, it will always give you the first result in the gallery, ever gallery select going forward it will show you 1 gallery item behind. I notice a workaroud is if you double-tap you alwasys get the correct result but that's because you are actually running the function twice before the detail view comes up and it aligns. 

 

In my app I've added an empty box over the selected item and used a clearcollect and navigate function for the OnSelect of that emply box. It is inside the selected item in the gallery as you can see below. 

 

I need to stress that this was working fine, nothing was changed in the app and then all of a sudden it started to operate this way,  AND it still operates fine when testing the app in the browser or using the app in Android. This is why I thought it is a bug with the ios app itself. 

 

In the detail view I can pull in data for the record that I select by using "First(MyRecord).Address" for example as the there is only ever one item in the MyRecord table (the selected item). 

 

Thanks again Michael and any further assistance will be appreciated. 

 

app_Onselect.PNG

 

I also forgot to mention that my data source is a static excel file

Are there any updates to this issue? I'm still noticing this bug. 

 

Thanks, Nick

after doing some additional digging in the forums i was to find the solution using this post:

https://powerusers.microsoft.com/t5/PowerApps-Forum/Gallery-cache-issue-on-iOS/m-p/61729#M25500

 

Ultimately using:

ClearCollect(MyRecord,ThisItem);Navigate(Screen3,ScreenTransition.Fade)

instead of this:

ClearCollect(MyRecord,Gallery1.Selected);Navigate(Screen3,ScreenTransition.Fade)

 on the navigation object fixed ths bug. 

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (41,168)