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
Solved! Go to Solution.
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.
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.
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!
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
253 | |
250 | |
84 | |
36 | |
32 |
User | Count |
---|---|
338 | |
265 | |
123 | |
72 | |
46 |