cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
btalk
Level: Powered On

Need help with transition from Browse Gallery to Detail Form

Hello!

 

I'm trying to make it so that when users click the next button on the contact gallery screen, it takes them to the details page for that contact. However, I would also like them to be able to click a button on the account screen to take them to the primary contact's detail screen and vice versa. I tried using OnSelect: Navigate('Detail Contact View',ScreenTransition.Fade,{displayItem:ThisItem}) on the next button in the gallery and contact button in the account detail view, but I get an error message that says, "Incompatible Type. We can't evaluate your formula because the context variable types are incompatible with the types of values in other places in your app."

 

(Reposting the pictures as .jpeg rather than .png)

 

Thank you in advance,

 

Bailey

 

9 REPLIES 9
Super User
Super User

Re: Need help with transition from Browse Gallery to Detail Form

Hi @btalk,

 

I believe that the error message you are getting is because your context variable "displayItem:",  in the curly brackets is used twice in a different way in two different icons.  See if changing the name of the variable in one of your icons eliminates the error.  Let me know if that works.   

btalk
Level: Powered On

Re: Need help with transition from Browse Gallery to Detail Form

Hi @Drrickryp,

 

Thanks for your response! That took away the error message, but now the next button on the gallery screen doesn't work. Nothing happens when I click it. Is there a way to have multiple screens navigate to the same details page, that populates based on what the user clicked to get there?

Super User
Super User

Re: Need help with transition from Browse Gallery to Detail Form

Hi @btalk,

There are a number of ways to have a single target screen from many source screens and you don't always have to use a context variable in the Navigate Command.  An alternative would be to use a global variable using the Set() function. For example, Set( selectedid,ThisItem.ID);Navigate('Detail Contact View',ScreenTransition.Fade).  In your target, Detail Contact screen, Make the Items property of the Edit form: Lookup(Contacts,ID= selectedid). Likewise in your accounts screen.  The global variable "selectedid" will stay the same until you select another person in your gallery.  Check out the Set() function at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-set for some examples of how it works.

btalk
Level: Powered On

Re: Need help with transition from Browse Gallery to Detail Form

Hi @Drrickryp,

 

I'm really sorry, I'm brand new to this. I put "Navigate('Detail Contact View',ScreenTransition.Fade);Set(selectedid,ThisItem.id)" under OnSelect for the next button then "LookUp(Contacts,contactid=selectedid)" in the Item field for the detail view, but I'm getting the same error before on the Gallery page and Invalid arguement type on the detail page.

Super User
Super User

Re: Need help with transition from Browse Gallery to Detail Form

No worries,  Could you tell me what data source you are using  (ie. Sharepoint list, Excel table, etc)  and if there is an ID column in it. I was assuming that you have an ID column your data source. 

To make it understandable, what we are trying to do is set a global variable from the gallery that you can use to identify the selected record that is being displayed in the Edit and View forms on different screens. This variable doesn't change until you pick a different record in the gallery.

btalk
Level: Powered On

Re: Need help with transition from Browse Gallery to Detail Form

My data source is Dynamics 365.

 

Thanks for explaining! That makes sense. I'm not sure if Dynamics has an ID that's consistent across accounts and contacts.

Super User
Super User

Re: Need help with transition from Browse Gallery to Detail Form

I'm not familiar with Dynamics 365 but lets test it.   If you select the viewform on the Contact Details screen, ilooking at the right hand side of the screen, click on fields and see if there a field called ID.

btalk
Level: Powered On

Re: Need help with transition from Browse Gallery to Detail Form

Master ID is the only ID field.

 

I set the next button to be OnSelect: "Navigate('Detail Contact View',ScreenTransition.Fade);Set(selectedid,ThisItem.masterid)"

I set the Item on the detial form to be: "LookUp(Contacts,selectedid=masterid)"

 

The next button doesn't work and the error on the detail form page says "Delegation warning. The highlighted part of this formula might not work correctly with the column "masterid" on large data sets. The data source might not be able to process the formula and might return an incomplete data set. Your application might not return correct results or behave correctly if the data set is incomplete."

 

Thanks again for all your help on this.

Super User
Super User

Re: Need help with transition from Browse Gallery to Detail Form

Hi @btalk,

I'm afraid that I don't know enough about Dynamics 365 as a data source to give you the help you need with this app.  Perhaps someone else more knowledgeable than I can get you further along.  Good luck though

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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