Hello,
I am trying to set up deep linking in my Power Apps following the video How to Migrate from App OnStart by Bulb Digital
I have created an app StartScreen, LoadingScreen with OnVisible property of:
Set(
isAppLoaded,
false
);
If(
IsBlankOrError(Param("ticketID")),
Set(
SelectedItemID,
Value(Param("ticketID"))
)
);
Set(varItemSelected, true);
Set(
isAppLoaded,
true
);
With a timer on the LoadingScreen and an OnTimerEnd property of:
If(varItemSelected,Navigate(OrderFormScreen), Navigate(Screen1));
And for the OrderFormScreen OnVisible property:
If(Not(IsBlank(SelectedItemID)), UpdateContext({varRecord:LookUp(PCSOrders, TicketNumber = SelectedItemID)}))
I have tried to enable the OnStart of the app and I cannot get that to show. Here is the screen I get when trying to load a specific record:
I appreciate any help you may be able to provide.
Solved! Go to Solution.
I made the changes. Passing the item from Screen1 to OrderFormScreen is working again using the varRecord.
I still get the same error when trying to deep link.
Could it be an issue with TicketNumber being a text field? TicketNumber is the reference field in the Orders SharePoint List.
Again, thank you for all of your input and assistance. I appreciate it greatly.
Hi @jrybachek ,
No ,this is something else - I am actually using the ID as the parameter I send through, which I do on every one of my deep-linked apps and I have never experienced your error. It actually should simply come up as a blank screen if not record is found. As a test. get rid of the Navigation (automatic) and put it on a button on the first screen. See if it lands on that properly and then navigates.
I created a button on the starting screen, which is LoadingScreen. The button has an OnSelect of below.
Set(gblID, 11111 ); Set(varRecord, Blank());Navigate(OrderFormScreen);
I wanted to set the glbID to an existing record. I also cleared the varRecord because I had tested that and the variable was still stored. I get to the OrderFormScreen but it does not bring in the item.
Also, I tested going to just the loading screen, and the OnTimerEnd did work to route me to Screen1 when not trying to use a deep link.
Try the same thing using the deep link - just put all the code on the Button
If(
!IsBlankOrError(Param("ticketID")),
Set(
gblID,
LookUp(
PCSOrders,
TicketNumber = Param("ticketID")
).ID
)
);
If(
gblID > 0,
Navigate(OrderFormScreen),
Navigate(Screen1)
);
and the Form Item
LookUp(
PCSOrders,
ID = gblID
)
I also suggest you get away from using a Variable as the Item of a form - unless you update the Variable -OnSuccess use
Set(
varRecord,
Self.LastSubmit
)
your form will not show the current state of the record. I use the gblID on every form I have and it works perfectly.
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
That gave me progress! Thank you! Tomorrow I will have to move stuff around to get it to work without pressing a button, but that worked as expected, for the most part.
Thank you so much for your help
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |