cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lalit_Kadam
Helper III
Helper III

Navigate screen on application load in canvas app

Hi,

 

Is there any way to Navigate screen on application load in canvas app? I tried below code for same but it is not working.

 

On Start property of App :- 

If(User().FullName ="Lalit Kadam",Navigate(Admin_screen),Navigate(User_screen))

 

Here I am trying to navigate screen if user name is Lalit Kadam then it should navigate Admin_screen else navigate to User_screen.

 

I am bit confuse how to use On visible property of first screen.

 

Regards,

Lalit Kadam

3 REPLIES 3
Ben-Western
Helper II
Helper II

@Lalit_Kadam ,

The easiest way I got this to work was to on app start use the following:
If(User().FullName ="Lalit Kadam", Set(useTimer, true), Set(useTimer, false))

 

I then create a timer control and hide it off the screen on the normal home page by changing its X or Y coordinate to a negative value

If the height of the control is 40, -41 will place this off the screen on the Y Axis

 

On the timer control I then set the following settings:

Duration = 1

OnTimerEnd = Navigate(Admin_screen)

Start = useTimer

 

This successfully redirected me to the new screen.

 

When using controls off the canvas... Note that you have to use the "Tree View" to select and edit them.

 

Please mark this as a solution if this resolved your issue.

 

Regards,

Ben!

 

v-bofeng-msft
Community Support
Community Support

Hi @ Lalit_Kadam:

Do you want to navigate to the specified screen based on the user's name when opening the app

I made a similar test but didn't encounter the problem you mentioned:

There are there screens in may app(Screen1/Screen2/Screen3) and “Screen1” is my first Screen.

Step1:set the OnStart property to:

If(User().FullName="bof",Navigate(Screen3),Navigate(Screen2))

Step2:Select run OnStart

 

The app will navigate to screen3

I guess you may not have done the second step I listed. The point is to selecting run OnStart to test the apps OnStart property.

Best Regards,

Bof

Thanks for quick reply. 

It is working now.

 

I was applying both steps but did not understand when we run OnStart property the focus of application move to Screen2 on design view. now i published the App and run from Home-->App-->Run myapp and it is working as expected. 

 

Regards,

Lalit Kadam

 

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.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,275)