cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Advanced navigation inside application

Here's the situation:

The app allows to read/write Table_A and Table_B (boh coming from excel). For each of these tables, the app contains a screen named Table_ADetailScreen and Table_BDetailScreen respectively. Inside of these screens is a viewForm displaying informations about a chosen element from Table_A or Table_B (name, age... for Table A; car, location... for Table_B). Now the app also contains a third table Table_C consisting of a single element from both tables in order to link them (name, location).  My goal is to implement 2 buttons inside the Table_CDetailScreen named "more details on Table_A" and "more details on TAble_B", both of which would navigate to the detail screen of the concerned element in Table_A or Table_B.

I think that to do so, I would need to get the specified field in Table_C and do a lookup of Table_A/B to match word, but I'm at a loss as to how to do so. (If someone has a simplier solution also then I'll take it gladly).

 

Thanks for reading through !

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @Anonymous ,

 

You will need to add 2 new display forms to show the Table_A/B's matched record. You cannot make a display form to both show the item you selected from a gallery and the matched record you select from another gallery. 

 

If you can accept this, then your requirement can be achieved by following below steps:

 

For button1, set below formula in OnSelect property:

Navigate(ScreenA,None)

Add a new screen named "ScreenA" and insert a display form, set below formulas for it:

 

 

DisplayForm1.DataSource=Table_A 
DisplayForm1.Item=Lookup(Table_A,Name=DataCardValue1.Text)

DataCardValue1 is the label control's name that store the Name column in Table_CDetailForm in Table_CDetailScreen (I assume that this screen has the display form of Table_C).

 

For button2, repeat the above steps and change the data source name and control's name. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
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

3 REPLIES 3
RandyHayes
Super User
Super User

@Anonymous 

So, the first question is, do you already have the logic in mind to determine which screen you are going to?  In other words, if the user clicks on something, you know to take them to Table_ADetailScreen or Table_BDetailScreen, or is this what you are having issues with?

 

Once you are in either details screen, the part you need to put a formula in will be the Item property of the ViewForm. That will simply be about doing a Lookup(whicheverTable, Location=whateverLocationSelected && name=whateverNameSelected)

Now the next question is, are users going to be selecting this from a Gallery of items or what is the way that a user selects something?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Anonymous
Not applicable

Hello @RandyHayes ,

 

I'm having issues with actually taking them to the detail screen. I don't know what formula to put in the "OnSelect" property.

As for the selection process, there's a screen named ListOfTableAItems that is a GalleryView, user selects one item from this galleryView and the selection takes you to the Table_CDetailScreen, inside which you can click on the 2 buttons that I want to implement.

v-monli-msft
Community Support
Community Support

Hi @Anonymous ,

 

You will need to add 2 new display forms to show the Table_A/B's matched record. You cannot make a display form to both show the item you selected from a gallery and the matched record you select from another gallery. 

 

If you can accept this, then your requirement can be achieved by following below steps:

 

For button1, set below formula in OnSelect property:

Navigate(ScreenA,None)

Add a new screen named "ScreenA" and insert a display form, set below formulas for it:

 

 

DisplayForm1.DataSource=Table_A 
DisplayForm1.Item=Lookup(Table_A,Name=DataCardValue1.Text)

DataCardValue1 is the label control's name that store the Name column in Table_CDetailForm in Table_CDetailScreen (I assume that this screen has the display form of Table_C).

 

For button2, repeat the above steps and change the data source name and control's name. 

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,254)