Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

powerapps: populate drop down list from another datasource

Tags:

powerapps

I stumbled across Microsoft PowerApps earlier, and though I would have a play with it. I have connected to my SQL Server, and created a template for browsing, viewing and editing a basic application. Now in my database I have the following relationship:

enter image description here

On the add/edit screen this asks the user to enter the "CustomerID". I want to be able to use a drop down menu to search the list of customers.

So far I have:

  1. Added an additional Datasorce to my table "Customers"
  2. Changed the control from a text box to a drop down menu

enter image description here

it is at this stage I am stuck and unsure of how to progress further. Currently when debugging, the list shows nothing, nor appears to be searchable.

like image 501
Crezzer7 Avatar asked Feb 06 '23 21:02

Crezzer7


1 Answers

This is how you do it...

First put the tableName and columnName(the one that you want to display) in the DATA field of DataCardValueX. Refer the image below. Here I am putting ProjectName field of ProjectData table for display.

image1

Now go to its parent DataCardX, go to DATA and change the Update field to DataCardValueX.Selected.ColumnName (the one that you want to use to get actual ID value). Refer the image below. Here I am putting ID field of my ProjectData table to get the actual id value from.

image2

Thats It. Now you can select the name and have the actual value assigned to the form.

like image 155
Harshil Patel Avatar answered Feb 08 '23 09:02

Harshil Patel