web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Link between the App O...
Power Apps
Unanswered

Link between the App OnStart and the App StartScreen

(0) ShareShare
ReportReport
Posted on by 3,506

Inside our App's OnStart >> I have the following formula, to set the DisplayMode of a form:-

Set(
 varRecord,
 LookUp(
 'Online Credit Request',
 ID = Value(Param("onlinecreditrequestid"))
 )
);
If(Param("custommode") = "new",NewForm(Form2),
Param("custommode") = "edit" && !IsBlank(varRecord),EditForm(Form2),Param("custommode") = "view" && !IsBlank(varRecord),ViewForm(Form2),Set(varStartScreen,"NotFound")
)

and if all the If statement condition fails, i am setting a global variable named "varStartScreen" to NotFound to redirect the user to a not found screen.. but seems i can not define a Navigate inside the Onstart property, nor i can pass the global var from the Onstart to the StartScreen property.. so how i can do the redirect tot he NotFound screen in this case?

Thanks

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @johnjohn123 :

    Maybe you could try this solution:

    Set the app's StartScreen property to:

    If(
     !(
     Param("custommode") = "new" || 
     (Param("custommode") = "edit" && !IsBlank(LookUp('Online Credit Request',ID = Value(Param("onlinecreditrequestid")))) || 
     (Param("custommode") = "view" && !IsBlank(LookUp('Online Credit Request',ID = Value(Param("onlinecreditrequestid")))))
     ),
     NotFoundScreen
    )

     Best Regards,

     Bof

  • johnjohn123 Profile Picture
    3,506 on at

    @v-bofeng-msftthanks for the reply.. so you need i will need to add the same logic inside the OnStart as well? so i will have the same logic inside the App OnStart and inside the StartScreen properties?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @johnjohn123 :

    No, you don't need to modify the OnStart property, just keep it as it was.
    Best Regards,

    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard