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:
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?
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.
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 :
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
)
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.
Coalesce(varserverorderform.Status.Value, "AlsoNo")
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.