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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OnStart and StartScree...
Power Apps
Unanswered

OnStart and StartScreen with multiple param

(1) ShareShare
ReportReport
Posted on by 4

Hi, 

I have hard time understanding the new StartScreen Alternative. My app was made last year but I was creating a new feature and needed to use another Deep Link for it. At that point my app doesn't change the screen to an specific record. I have seen several videos and read the recent articles on the matter but all examples are related to just one param. 

 In my OnStart screem i used to have all of this. ( you can see it in the image) . Can anyone help me with this. 

 

Is there a way to make it work with all of the params? 

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Navigation in App.OnStart not allowed anymore (New App.StartScreen??) - Deep Link problem Can you check the above thread replies, especially in case you need it to kind of force it to work like it did before with workaround for a quicker solution in short term?

     

    Also, in case you do want to try and adapt the new way,  can you check specifically this part in the docs and Param function, see if it helps?

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/object-app#startscreen-property

    The StartScreen property determines which screen will be displayed first. It's evaluated once when the app is loaded and returns the screen object to be displayed. By default, this property will be empty, and the first screen in the Studio Tree view is shown first.

    StartScreen is a data flow property that can't contain behavior functions. All data flow functions are available, in particular use these functions and signals to determine which screen to show first:

    • Param function to read parameters used to start the app.
    • User function to read information about the current user.
    • LookUp, Filter, CountRows, Max, and other functions that read from a data source.
    • Any API calls through a connector, but be careful that it returns quickly.
    • Signals such as Connection, Compass, and App.


     

    See if above helps you as starting points.

     

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Kokobita ,

    Take the Navigate component (the whole If() statement) out of OnStart and put this in StartScreen

    If(
     Value(Param("ObsID“)) <> 0,
     Detalles_Screen, 
     YourNormalStartScreen
    )

     

    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.

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Kokobita ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

  • TWoQueeG Profile Picture
    10 on at

    FYI - just read the blog post and the comments. very interesting.

     

    StartScreen does NOT support deep linking. Not yet. 

    OnStart is going nowhere. You can enable it in settings (general).

    You can 'Enable Navigate function in App.OnStart' (Upcoming Features)[Retired]

    I'm just ignoring the errors for now. Functionality isn't affected.

     

    MS want a declarative model where variables are set when they are needed (which is worked out by algorithm not programmer). I'm not convinced 200 calls to get individual config variables is as efficient as creating a collection once, but hope to be proven wrong.

    I'm happy with the idea for most use cases and am interested to see where it goes.

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @TWoQueeG ,

    That is incorrect - I have several apps successfully deep linking using opening parameters arguments in StartScreen exactly like my post below. That however is the only condition that I can see will work as they already exist when the app is opened.

    It will not accept Global Variables or (it appears from a post I answered recently) anything set in OnStart such as a collection content as it appears that StartScreen executes concurrently and will have navigated the time OnStart has done anything it may be dependent on.

  • TWoQueeG Profile Picture
    10 on at

    Hi Warren,

    Your example chooses a screen but is not deep linking as I think of it.

    If(
     Value(Param("ObsID“)) <> 0,
     Detalles_Screen, 
     YourNormalStartScreen
    )

    For me the parameter must be passed and an action (opening a record) performed based on it. 

    The example just goes to a screen but the Param function would have to be called again to get the value of the parameter

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @TWoQueeG ,

    Below is the actual code from one of my production apps and it works perfectly - if I send it an ID reference deep link, it goes to the edit screen with the chosen ID displayed and if I open without parameters, it opens at the intro screen.

    If(
     !IsBlank(Param("idref")),
     scrItem,
     scrIntro
    )

     

  • radiosonicfan Profile Picture
    72 on at

    @TWoQueeG  I am having the same issue as you. When I tried saving in the new build. Deep Linking is not working for me. It has been a bad week. @WarrenBelz  Your kind suggestion is not working for me. I had to revert to a previous App version to restore functionality. 

     

    Old Build (Works perfectly)
    OnStart:
    Set(varProgID, Value(Param("ProgID")));
    If(varProgID <> 0,Set(varRecord, LookUp(CDLForm, ID= varProgID)); Navigate(Home))


    New Build (can't find a working solution)
    OnStart
    Set(varProgID, Value(Param("ProgID")))

    StartScreen:
    If(
    Value(Param("ProgID")) <> 0,
    EditScreen1,
    BrowseScreen1
    )

     

    Microsoft did say (below). Does not help me now. 


    Older app with new Navigate workaround

    Here’s the exception mentioned before.  If you had an existing app created before March 2021, that did not have a Navigate call in App.OnStart, to which you added Navigate to the OnStart between March and now, then the above switch will be turned off and you will see an error the next time you load the app in Studio.  Please turn the above switch on to clear the error.  We have a fix for this case that will be rolling out soon, but it will be a few weeks until it is fully deployed.

  • TWoQueeG Profile Picture
    10 on at


    Hi Warren - does the edit screen have to call the Param function again to find out what ID to display?
    The trouble for me is that I only want the to display the record on the first entry, so I can call the edit screen with a different ID from within the app.

    The new system requires the scrItem to check if its the first run and if so set the ID to display to param("idref")
    Not only are you checking param("idref") twice but there is now extra code in the scrItem.OnVisible so you don't overwrite the ID to display if you call it from another screen. 
    I would love to be wrong here - I'd really appreciate it if you could provide some code and explain in simple terms for me scrItem knows what ID to display.

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @TWoQueeG ,

    I set the Global Variable in OnStart as usual (with the parameter) and by the time the edit screen opens and the form displays, it shows the record that was sent in the parameter. As I mentioned, the only way it seems this will work presently is if the ID comes in the deep link (so that does not help you). I only can suggest that you turn on the switch below for now

    WarrenBelz_0-1636158572561.png

     

    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.

    Visit my blog Practical Power Apps

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard