Hello,
We would like to create a URL which will:
(1) Open Power Apps
(2) Go to the Edit Screen (we currently have 3 screens, Browse, Detail and Edit)
(3) Filter by a given record - i.e. MyFieldName=24
i.e.
https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24
But, cannot get this to work. Tried looking at this example but it did not work.
https://powerapps.microsoft.com/en-us/blog/powerapps-deep-linking/
Appreciate any assistance you can provide,
Dan
Solved! Go to Solution.
Hi @lesotho_kid ,
Your deep link code looks right
https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24
At App OnStart, do this
If(
!IsBlank(Param("MyFieldName")),
Set(
vID,
Value(Param("MyFieldName"))
);
Navigate(YourEditScreen)
)
On the Item of your Edit Form
Lookup(
YourListName,
ID=vID
)
If you also navigate to this record by selecting it in a gallery, put this on the Gallery OnSelect
Set(vID,ThisItem.ID);
Navigate(YourScreenName)
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 @lesotho_kid ,
Your deep link code looks right
https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24
At App OnStart, do this
If(
!IsBlank(Param("MyFieldName")),
Set(
vID,
Value(Param("MyFieldName"))
);
Navigate(YourEditScreen)
)
On the Item of your Edit Form
Lookup(
YourListName,
ID=vID
)
If you also navigate to this record by selecting it in a gallery, put this on the Gallery OnSelect
Set(vID,ThisItem.ID);
Navigate(YourScreenName)
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 @lesotho_kid ,
Could you please share a bit more about your scenario?
Do you want to edit a specific record in your canvas app via clicking the embedded App URL Link?
The user @Kumar9024021 has faced similar needs with you, please check my response within the following thread:
Please take a try with above solution, then check if the issue is solved.
Best regards,
Thanks @v-xida-msft for the additional links.
@lesotho_kid if you try the code I supplied, I believe it will work for you - please let me know.
Happy to help further.
Hi @WarrenBelz and @v-xida-msft
One update on this - working properly for the filter but we also have an "add new record" option. Not sure how to adjust the Item of edit form. Trying to do something like If FormMode.New - do something - but not sure how to tell it to go into new form mode (and use all defaults) as opposed to using the parameter as filter and edit the form.
Thanks!
Dan
On the Item of your Edit Form
Lookup( YourListName, ID=vID )
Are you asking to put another parameter into the URL for a new form?
You would do something list this
https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24&NewForm=1
then at App OnStart - you can do this without nesting, but try the below.
If(
!IsBlank(Param("NewForm")),
NewForm(YourNewFormName);
Navigate(YourNewScreenName),
If(
!IsBlank(Param("MyFieldName")),
Set(
vID,
Value(Param("MyFieldName"))
);
Navigate(YourEditScreen)
)
)
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.
Thanks @WarrenBelz
I would prefer to not use another parameter if I don't have to.
I have only one data entry form called 'MyEditForm'.
When I access via URL or from my browse screen I'd like to pass in the ID and edit an existing record. That works.
But, on my browse screen I also have an 'Add New' button which, when I click it, I'd like to open the same 'MyEditForm' - this time to create a new record.
The add button code is:
So, use one form to either edit an existing record or add a new record. Hope this is possible and I don't have to create an edit screen and an add new screen. The screen has many fields.
Thanks for all of your help - sincerely appreciated.
Dan
Hi @lesotho_kid ,
Yes that is certainly possible - mine was only an example of the syntax required with a different screen.
Thanks again @WarrenBelz - that worked. Sorry about all of the questions. Sincerely appreciate your help.
Have a good weekend,
Dan
User | Count |
---|---|
161 | |
86 | |
68 | |
63 | |
62 |
User | Count |
---|---|
212 | |
146 | |
93 | |
81 | |
68 |