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

Creating screen navigation from gallery

Hello All,

 

I am very new to PowerApps development environment but when I looked at some of the examples, I felt it will be more than enough for my case to create a ticket tracking tool.

 

I have created a collection using the following formula on application start

ClearCollect(Menu,
{name:"Dashboard", screen: S01_Dashboard}, 
{name: "All", screen: S02_All},
{name: "New", screen: S03_New},
{name: "In Progress", screen: S04_In_Progress},
{name: "On Hold", screen: S05_On_Hold},
{name: "Closed", screen: S06_Closed}
);

Then I inserted a gallery app and selected "Items" as "Menu". I have also grouped it with other textboxes and label to give a color selection and navigation help. Basically it looks something like below. The gallery menu now looks something like this after grouping. Where Rectangle 5_2 = Left hand dark blue vertical navigation helper, Rectangle4_3 = Top separator, TextBox4_2=Gallery label and Rectangle6_2=Light blue color background rectangle on selection of any gallery value. This same gallery section is copied to all the other screens along with the formula.

Capture.PNGimage.png

 

I have written following OnSelect code for screen navigation on selection of Gallery field. But the navigation is NOT working, but the vertical color bar and background color highligher works fine. Basically TextBox4_2 is capturing the gallery value, so I added a dummy label value and assigned it Text to "TextBox4_2.Text" to showcase this (It is showcased as New on the bottom section). If I change my Gallery Textbox OnSelect code to TextBox4_2.Select, code is showcasing 'Identifier isnt recognized' error.

If(
    TextBox4_2.Text = "Dashboard",
    Navigate(
        S01_Dashboard,
        ScreenTransition.None
    ),
    TextBox4_2.Text = "All",
    Navigate(
        S02_All,
        ScreenTransition.None
    ),
    TextBox4_2.Text = "New",
    Navigate(
        S03_New,
        ScreenTransition.None
    ),
    TextBox4_2.Text = "In Progress",
    Navigate(
        S04_In_Progress,
        ScreenTransition.None
    ),
    TextBox4_2.Text = "On Hold",
    Navigate(
        S05_On_Hold,
        ScreenTransition.None
    ),
    TextBox4_2.Text = "Closed",
    Navigate(
        S06_Closed,
        ScreenTransition.None
    )
)

Can someone help where is the error and why navigation is not working?

 

2 REPLIES 2
chrisog
Level 8

Re: Creating screen navigation from gallery

Hi @AKB_2K19 ,

 

Since you have created the collection, you could just set the OnSelect property to Navigate ( screen , ScreenTransition.None ) and it should work by referring to the relevant item's screen value.  I have a similar gallery on my app.

 

Let me know if this works and if not there may be other solutions.

chrisog
Level 8

Re: Creating screen navigation from gallery

Hi @AKB_2K19 ,

 

Since you have created the collection, you could just set the OnSelect property to

Navigate ( screen , ScreenTransition.None )

and it should work by referring to the relevant item's screen value.  I have a similar gallery on my app.

 

Let me know if this works and if not there may be other solutions.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 46 members 4,649 guests
Please welcome our newest community members: