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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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