Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

OnVisible Not working when Deeplinking

Posted on by

Hi,

 

I have a multipage app setup with Deeplinking and I have most of this working.  One of the pages in my app allows users to View an order they have previously placed through another part of the form.  This data is stored in Sharepoint.  Depending on one of the values stored in the Sharepoint, some fields will not be visible on the page.  This is done using a Switch as below : 

 

Switch(
varserverorderform.Status.Value,
"Submitted",Set(varStatus, 1),
"Approved",Set(varStatus, 2),
"Rejected",Set(varStatus, 3)
)

 

This code is in the "OnVisible" property of the screen which contains this form.  This fires fine if I navigate to this form from within the app itself, however I have a couple of parameters being passed in and one of these navigates directly to this screen using a deeplink, when this is done the "OnVisible" doesn't seem to fire.  I've tested this by setting up a label with the following code : 

 

If (IsBlank(varStatus), "No", varStatus)

I then have a second label which proves "varserverorderform.status.value" has a value in it, populated with the following code: 

If(IsBlank(varserverorderform.Status.Value), 
"AlsoNo", varserverorderform.Status.Value)

On loading my app using a deeplink, despite the fact the "Status" value is "Rejected", I see the following: 

Powertron_0-1653925930503.png

Now the varserverorderform label DOES initially show up as "AlsoNo" and then populates, could it just be a delay in loading the data causing this?  

  • Verified answer
    Powertron Profile Picture
    Powertron on at
    Re: OnVisible Not working when Deeplinking

    I have since been directed to the "Non-Blocking OnStart setting" in my Apps Settings menu to correct this.  Turns out "OnStart" and "OnVisible" run concurrently unless this is turned off.  As my OnVisible is reliant on a value from OnStart I have disabled this - the app now functions as I would expect.

  • Powertron Profile Picture
    Powertron on at
    Re: OnVisible Not working when Deeplinking

    Probably also worth mentioning the "varserverorderform" value is filled by an OnStart event : 

     

    Set(
     varserverorderform,
     LookUp(ServerOrderFormSRList, ID = Value(Param("recordid")))

    Where ServerOrderFormSRList is a sharepoint list, ID is the ID value (duh) and recordid is being passed in the URL : 

    Powertron_0-1653991803218.png

    The scrn parameter is also used to navigate directly to this other screen from the main menu in the event it is contained in the URL : 

    (From StartScreen)
    
    If(
     Param("scrn") = "1",
     ServerView,
     MainMenu
    )

     

  • Powertron Profile Picture
    Powertron on at
    Re: OnVisible Not working when Deeplinking

    Thanks, but that code was only put in there to test the contents of those variables, its mainly the switch in OnVisible that isn't working like it should be.

  • Drrickryp Profile Picture
    Drrickryp 30,510 on at
    Re: OnVisible Not working when Deeplinking

    @Powertron 

    Coalesce(varserverorderform.Status.Value, "AlsoNo")

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard