cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to use ID from param OR selected person in table as item in edit form

Hi everyone,

 

I am making an onboarding app that has two 'entries'.

Either you start the app "from scratch" and get to choose in a table which person to see and edit data for (this is what the HR personnell will do).

Or you are provided with a link sending you directly to the information page showing information for the person defined in a param in the URL.

 

How do I make the edit forms on the information page take the selected item in the table if one was selected, and the param from the URL if the user was sent directly to the page? Should I simply use "If" and a lookup?

 

All solutions/ideas are highly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Hi @tfarsund 

 

On your App On Start, first thing you can do is check to see if query param exists using the Param function

If it does then you can navigate the user to your edit screen and pass a context variable

example:

Navigate(EditScreen,ScreenTransition.None, {itemID:PARAMVALUE})

 

On App On start, if no param found user would be navigated to your home screen,

On home screen gallery, when user selects an item 

Navigate(EditScreen,ScreenTransition.None, {itemID:ThisItem.ID})

 

On your edit screen

for your Form control Item property

Use

Lookup(DataSource,ID = itemID)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Highlighted
Dual Super User II
Dual Super User II

Hi @tfarsund 

 

On your App On Start, first thing you can do is check to see if query param exists using the Param function

If it does then you can navigate the user to your edit screen and pass a context variable

example:

Navigate(EditScreen,ScreenTransition.None, {itemID:PARAMVALUE})

 

On App On start, if no param found user would be navigated to your home screen,

On home screen gallery, when user selects an item 

Navigate(EditScreen,ScreenTransition.None, {itemID:ThisItem.ID})

 

On your edit screen

for your Form control Item property

Use

Lookup(DataSource,ID = itemID)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,400)