cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tiamo_Liu
Regular Visitor

How can I jump to an assigned/customized Form from a View list?

Hi PowerApps professionals:

 

I have a model-driven app in PowerApps, an Entity called "ProjectInfoList". Within the Entity, there's a customized Views called "NewView". And there's a default Main Form under Forms when the Entity is created.

 

On the front-end page, I could see the data list of records through "NewView". By clicking the link text of one data record, it opens the default Main Form to show record details.

 

Later, I created a customized Main Form called "NewForm". On top of this change, when I click the link text of one data record on the front-end page, it automatically opens the Main Form "NewForm" that I created to show the record details. It has different set of fields and different format to the Entity's default Main Form.

 

What I would like to get is: when I click the link text of one record, it could open the Form that I assigned, either the default Main Form or the created "New Form". In another words, I expect View A can navigate to Form A, View B can navigate to Form B, all of them are from the same Entity.

 

Can anyone share the way how to achieve this goal?

I searched many resources online but failed to see a proper reference.

 

Thanks in advance!

Untitled.png

2 REPLIES 2
GarethPrisk
Super User II
Super User II

What you are describing is not quite possible. However, there are a few ways to accomplish this.

There are functions you can execute on a view's column, and you could execute the openForm function. This would need to be setup per view, for a specific form, and for multiple columns. This likely would not lead to a consistent user experience.

 

If it is absolutely necessary to switch Forms based on the record, then you can accomplish this with a form script on either of the forms.

  1. Create a web resource to put on each of the Forms
  2. Determine the logic (similar to view logic) to determine what kind of record opens what kind of form
  3. Execute an OnLoad function that calls
    1. https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navig...
    2. https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utili...
    3. You can use their samples to build up the function, and dynamically determine if the form is the correct one, otherwise open the other form

This is not a great approach, I realize, but it's going to be the simplest way to accomplish the desired behavior.

 

A few items for consideration:

  1. Are the forms really that much different? Can you simply show/hide based on the same criteria that determines the views?
  2. How often will users change types? If it's minimal, then the approach above should be fine, since the double-navigation won't happen every time

Hi @GarethPrisk ,

 

Thanks a million for your reply. It gives couple of suggestions. Among those, I believe "There are functions you can execute on a view's column, and you could execute the openForm function" is what I'm eager to pursuit. Due to my light knowledge base, could you please kindly share a detailed example of how to execute functions on a view's column, and where to execute the openForm? I read through the openForm function doc, it seems like the "formId" has to be assigned to the openForm in order to display the desired form instance, could you please also comment where to find the "formId"?

 

Thanks again!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (89,905)