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

Lookup three tables

Hi, I have three tables which are Supplier, Question and Answer.

I already created a gallery for supplier details . Once I click supplier 01 it will redirect to another page. I have (Question table)  in gallery. When I click on the supplier.. It will redirect to the next page which has supplier information in left hand side. In right hand side, I had created question gallery. Now I would like to lookup answer table to see all the answers by the particular supplier. Refer to the image below.  I use lookup but it doesn't work. How do I lookup in question gallery to get the information of the supplier answered of the particular question? I use  this code in default property in text input gallery question : LookUp(Answer, SupplierID = Gallery2.Selected.QuestionID,'SupplierAnswer')

 

Supplier Gallery

 

supplier gallery.PNG

 

Left (supplier info using lookup)

Right ( Question Gallery)  I would like to display the answer answered by supplier in question gallery. 

 

left (supplier information) right(question gallery).PNG

Answer table excel( data source)

 

answer table.PNG

 

Question table excel

question table.PNG

  

 

The attribute for supplier is supplier id

The attribute for Question table is question id, question.

The attribute for answer table is supplier id, question id and SupplierAnswer

 

Thank you,

Nanthinee

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @Anonymous ,

 

As per your description, since you are using Excel table as data source, and you have the answer table that stores supplier ID along with Questions and answers referred to the supplier, you could set the Question Gallery Items to:

 

Filter(AnswerTable,SupplierID= SupplierGallery.Selected.'Supplier ID')

 

 

Then you could change the Text property of a Label to:

LookUp(Question,QuestionID = ThisItem.QuestionID).Question

This formula means populate the Label with Qusetion column value in Qusetion table corresponding to the Question ID in Answers table.

 

See my demo below:

123.gif

 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
Suchitra1996
Resolver II
Resolver II

@Anonymous 

 

I have tested this on my end, I have used a gallery on screen 1 with data source as Supplier, on select of supplier ID I'm navigating to screen2 which displays the 2nd gallery with data source of Question.

Suchitra1996_0-1613975962060.pngSuchitra1996_1-1613975972425.png

Suchitra1996_2-1613975982757.png

 

Instead of ID, I have used titles. Then, I'm displaying the answer from Answer Data source with below formula:

LookUp(Answer,Title=Gallery1.Selected.Title && QuesID=Gallery2.Selected.Title,Answer)

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

v-jefferni
Community Support
Community Support

Hi @Anonymous ,

 

As per your description, since you are using Excel table as data source, and you have the answer table that stores supplier ID along with Questions and answers referred to the supplier, you could set the Question Gallery Items to:

 

Filter(AnswerTable,SupplierID= SupplierGallery.Selected.'Supplier ID')

 

 

Then you could change the Text property of a Label to:

LookUp(Question,QuestionID = ThisItem.QuestionID).Question

This formula means populate the Label with Qusetion column value in Qusetion table corresponding to the Question ID in Answers table.

 

See my demo below:

123.gif

 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

v-jefferni
Community Support
Community Support

Hi @Anonymous ,

 

Have you resolved the issue? 

If above post helps, then please consider Accept it as the solution to help the other members find it.


Best regards,
Community Support Team _ Jeffer Ni

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

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,388)