cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tfarsund
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
RezaDorrani
Dual Super User
Dual Super User

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
RezaDorrani
Dual Super User
Dual Super User

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,713)