cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jcollins
Advocate II
Advocate II

Deep linking issue to view record from 2 lists

Similar issue was posted 2 weeks ago by @bheiland but his solution did not work for me. @WarrenBelz 

 

I have a record that has 2 datasources (SP Lists) that I want to include a link in the approval form for. 

 

I understand the deep linking aspect but have come up empty as to why the form is still not showing my record data. 

 

My App onStart: 

 

Set(varParentID, Value(Param("vprid")));
If(varParentID<>0,Set(varParentRecord, LookUp('Vendor Payment Request', ID =varParentID)); Navigate(scrForms));
If(varParentID<>0,FormMode=FormMode.Edit)

 

 

My gallery of child records on the welcome screen OnSelect: 

 

Set(varParentRecord,ThisItem); ViewForm(frmVendorParent);Navigate(scrForms);

 

 

My Form1 Item: varParentRecord

 

My Form1 displays a gallery of Details. gallery Items property is:  

 

Filter('Vendor Details',ParentID=varParentRecord.ID)

 

 

In my tests, I set a button that sends me an email with the parameter included in the URL.  It looks like this and works enough to bring me to a blank form page instead of the record's  item: 

 

https://apps.powerapps.com/play/6c7b8449-38e7-4350-92f1-38eae93b4e70?tenantId=e06def3d-3206-4238-9d5f-05bd02151a43&vprid=78

 

I also set a Label with text set to: varParentID and it too shows correct (78)

 

Much appreciated for any help! 

 

j

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @jcollins ,

Firstly, my approach does not involve setting a record as a Variable, so I cannot attest to the efficiency of this. I will show you how I effect this function.

Firstly, your link code

https://apps.powerapps.com/play/6c7b8449-38e7-4350-92f1-38eae93b4e70?tenantId=e06def3d-3206-4238-9d5f-05bd02151a43&vprid=78

Is fine and will send a parameter called vprid to the app as an incoming parameter.

The next bit of your code - the last item does not do anything

Set(
   varParentID, 
   Value(Param("vprid"))
);
If(
   varParentID<>0,
   Set(
      varParentRecord, 
      LookUp(
         'Vendor Payment Request', 
         ID=varParentID
      )
   ); 
   Navigate(scrForms)
);

If(                         //this does nothing - you have to refer to the form
   varParentID<>0,
   FormMode=FormMode.Edit
)

I approach it this way - App OnStart

Set(
   varParentID, 
   Value(Param("vprid"))
);
If(
   varParentID>0,    //makes sure you have a number
   EditForm(frmVendorParent);  
   Navigate(scrForms)
)

The Item of your form is

LookUp(
   'Vendor Payment Request', 
   ID=varParentID
)

The OnSelect of your gallery

Set(varParentID,ThisItem.ID);
ViewForm(frmVendorParent);
Navigate(scrForms)

 

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.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User III
Super User III

Hi @jcollins ,

Firstly, my approach does not involve setting a record as a Variable, so I cannot attest to the efficiency of this. I will show you how I effect this function.

Firstly, your link code

https://apps.powerapps.com/play/6c7b8449-38e7-4350-92f1-38eae93b4e70?tenantId=e06def3d-3206-4238-9d5f-05bd02151a43&vprid=78

Is fine and will send a parameter called vprid to the app as an incoming parameter.

The next bit of your code - the last item does not do anything

Set(
   varParentID, 
   Value(Param("vprid"))
);
If(
   varParentID<>0,
   Set(
      varParentRecord, 
      LookUp(
         'Vendor Payment Request', 
         ID=varParentID
      )
   ); 
   Navigate(scrForms)
);

If(                         //this does nothing - you have to refer to the form
   varParentID<>0,
   FormMode=FormMode.Edit
)

I approach it this way - App OnStart

Set(
   varParentID, 
   Value(Param("vprid"))
);
If(
   varParentID>0,    //makes sure you have a number
   EditForm(frmVendorParent);  
   Navigate(scrForms)
)

The Item of your form is

LookUp(
   'Vendor Payment Request', 
   ID=varParentID
)

The OnSelect of your gallery

Set(varParentID,ThisItem.ID);
ViewForm(frmVendorParent);
Navigate(scrForms)

 

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.

View solution in original post

Hi @jcollins ,

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.

I have to admit, most of the issue was indeed having my Form in New mode instead of Edit, so some things were just not showing up. However, changing the logic to what you had provided made it more efficient and easier to spot that. Thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (33,020)