
Hi,
We have developed a “Tablet Application” and here we are facing issue while selection of item in gallery. In the landing screen I am listing out the Types in gallery, once we select an item it redirects to the particular selection type screen. On Select I have written code as shown below.
OnSelect :
If(Gallery.Selected.TypeName="Type1",Navigate(Type1Screen,ScreenTransition.Fade),If(Gallery.Selected.TypeName="Type2",Navigate(Type2Screen,ScreenTransition.Fade),If(Gallery.Selected.TypeName="Type3",Navigate(Type3Screen,ScreenTransition.Fade),If(Gallery.Selected.TypeName="Type4",Navigate(Type4,ScreenTransition.Fade)))))
The code is working as expected in development environment as well as in emulator (Dynamics365) but when opening it in iPad it is not working as expected.
Issue:
If I select Type1 as first time it is navigation to “Type1Screen” but if I select Type2 as second time it is navigating to “Type1Screen”(previous selection) and if I select Type4 as third time it is navigating to “Type2Screen”(previous selection) and if I select Type3 as third time it is navigating to “Type4Screen”(previous selection).
Observation:
The previous selection is staying at Landing screen level but once the screen navigation happens I am able to see the current selection of type only. For example I selected Type2 at gallery for second time and it navigating to Type1Screen but in this screen if I assigned “Gallery.Selected.Typename” to the label it displaying the “Type2” only. Could you please tell me anyone if you face the issue like this.
Try this:
If(ThisItem.TypeName="Type1",Navigate(Type1Screen,ScreenTransition.Fade),
ThisItem.TypeName="Type2",Navigate(Type2Screen,ScreenTransition.Fade),
ThisItem.TypeName="Type3",Navigate(Type3Screen,ScreenTransition.Fade),
ThisItem.TypeName="Type4",Navigate(Type4,ScreenTransition.Fade,{ElevatorViewScreen:"List"})
)It uses the multiparameter syntax of If as well as resolving your selected issue, hopefully.