cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrtojin
Frequent Visitor

Bug with Gallery's OnSelect skipping over random "functions"

I will try to make this short and simple. Here is the scenario:

This an OnSelect set up on a gallery item. Main thing to look here are the 4 "con" variables I have in place. By the logic set up here, the variable is suppose to increase by 1 every time I run this:
mrtojin_0-1644383802181.jpeg
Yet, after my first run, not all of my variables were updated successfully. It's almost as if some functions were skipped:
mrtojin_1-1644383815599.jpeg
This makes no sense. It seems that my gallery on select property is skipping over some "functions" and not quite sure why. If I continue on with my testing, after running the code 2 more times, you will see that con3 variable finally ran.
mrtojin_2-1644383829530.jpeg

I did not take a screenshot of this but con3 was not the only one that was sometimes being skipped. con2 and con4 were skipped as well.

 

This behavior is consistent on both the OnSelect of the Gallery, and an OnSelect of the controls inside the gallery. This is not just restricted to the variables I set in place in here. Those were just used for this example to easily showcase the issue. I had times were the navigate Function has been skipped, the Notify, and even some of the other variables that are supposed to provide the records for some of my forms. No errors are being triggered or recorded either. Haven't done a full-on test to narrow down why this is happening but I did want to report it to see if anyone else is getting this issue. 

This is concerning... this type of behavior could break the app. Correct me if you see something wrong with my code here but there isn't much room for developer code error here. My scenario is pretty straight forward.
1 ACCEPTED SOLUTION

Accepted Solutions
mrtojin
Frequent Visitor

Quick Update

 

It seems the issue has now been fixed. Thank you for some of you that reported reporting similar issues or suggestions. I haven't pushed out a special fix to address the problem, so I assume this was a bug that was fixed by the Power Apps developers. You should try testing your app again to see if the issue was fixed @CPalaloga 

View solution in original post

11 REPLIES 11
CPalaloga
Frequent Visitor

For me is pretty similar, I just set a global variable and Navigate to a different Screen.


Set(SWLoading,true); //splash screen
Set(CSPV12ConfigurationScreen,"1"); //global variable 1
Set(STRTestLine,ThisItem.Index);//global variable 2
Navigate(CSPV12TemplateStraightness,ScreenTransition.None);

First time, the variable is set and it navigates to the Screen. Go back and try a new line of the gallery.

Second time, the variable needs to be reset, but the software crashes and it just restarts the application.
Monitoring the application doesn't give any insight on the error.

I changed from global variable, Set, to a collection with one value and the system still crashes.

 

What is even stranger is that this function have been running for the last 6 months, since yesterday, and nobody touched this simple function.

PowerRanger
Resident Rockstar
Resident Rockstar

@mrtojin 

Hi. First of all you should not place any code after Navigate()...it is very likely that this code won't be executed as you Navigated to another screen.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.
CPalaloga
Frequent Visitor

There is no code after Navigate. The code is in the new page where navigate will take you.

@CPalaloga Could you provide some more details? You have provided 3 Screenshots.

1. On the first Screenshot, after Navigate() you call UpdateContext({Con4.....

2. The other screenshots do show a Gallery. On which screen are these Galleries? Employee Details?

 

 




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

@CPalaloga What do you mean by crashes? How do you Navigate Back? With Code or do you use the Back button of the browser?




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

@PowerRanger I didn't provide any screenshots. Those were added by @mrtojin 

@CPalaloga Sorry, that comment was ment for the original author.

 

What do you mean by crashes? How do you Navigate Back? With Code or do you use the Back button of the browser?




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

The application uses a navigation back with value global being reset.

We have not reached that since the crash is happening earlier.

 

Value Page (Gallery with rows of data) >>Navigate to Validation page

During this transition we execute the above functions.

The software crashes and restarts before it reached the Validation page. No error displayed, not even when the software is connected to monitor

@CPalaloga What Browser are you using. Have you tried re-publishing your app? Clear Browser Cache? Does the issue occur on different Browsers / different PCs?

 

Is there any Code in the OnVisible property of the CSPV12TemplateStraightness Screen?




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,769)