cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidyc
Helper II
Helper II

Model Driven App Dashboard: Specify default form to be used when opening record from view on a dashboard

Hi there,

 

I have a dashboard in my Model Driven App with a series of 6 views all based on the Contact entity. When a user clicks on a record from any of the views, I would like a specific form to be shown by default, rather than one of the other main forms on the Contact entity.

 

Unfortunately defining a form order won't be an answer since I need to explicitly specify another default form on the same entity in another context. 

 

Can anyone advise if there is a way to meet this requirement?

 

model-driven apps

model driven

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

You can technically use the DOM, and other methods, to effectively run your own function on the views in the dashboard. However, I don't recommend this because users can/will get to Contacts from other places (non-dashboard), and then the behavior will not exist.

 

An alternative approach would be to use JavaScript on the form(s). This is a bit heavy-handed, but can work.

  • Presumably the views on the dashboard are based on parameters
  • You could use those same parameters (IF {Contact Field} = A, THEN X, ELSE IF {Contact Field} = B, THEN Y, ELSE Z)
  • You could determine the form the user is on, and if it's not the correct form you could redirect them
  • I don't love this because it effectively will double-navigate a user and may be jarring

An additional alternative approach would be to consolidate the forms into a single form. Then dynamically show/hide elements that are specific to the Contact that has been selected.

View solution in original post

4 REPLIES 4
GarethPrisk
Resident Rockstar
Resident Rockstar

Change the form order, to ensure it is considered the default form for the user.

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/assign-form-order

Additionally, if a user switches forms, it should cache that selection and continue to use the form.

Thanks Gareth, my understanding is that the form order can only be controlled at the entity level - is that correct? I want to specify a default form for one view on the Contact entity and another form for a different view on the contact entity - can this be done? 

GarethPrisk
Resident Rockstar
Resident Rockstar

You can technically use the DOM, and other methods, to effectively run your own function on the views in the dashboard. However, I don't recommend this because users can/will get to Contacts from other places (non-dashboard), and then the behavior will not exist.

 

An alternative approach would be to use JavaScript on the form(s). This is a bit heavy-handed, but can work.

  • Presumably the views on the dashboard are based on parameters
  • You could use those same parameters (IF {Contact Field} = A, THEN X, ELSE IF {Contact Field} = B, THEN Y, ELSE Z)
  • You could determine the form the user is on, and if it's not the correct form you could redirect them
  • I don't love this because it effectively will double-navigate a user and may be jarring

An additional alternative approach would be to consolidate the forms into a single form. Then dynamically show/hide elements that are specific to the Contact that has been selected.

Thank you Gareth! i think the last idea is favourable in this instance I will mark as the solution.

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 (1,779)