cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k_cain
Helper II
Helper II

Populate from SharePoint

Hey guys, I am going nuts trying to figure this out. I have a SharePoint list (called A-MAP) with two columns named "FHA Number" and "Property Name" (see first screenshot). I've created a data card for a user to select the FHA Number from a dropdown (called FHA Number_Dropdown). When a user selects an FHA Number, I want the Property Name field in the app (called Property Name_Input) to populate with the data from the SharePoint list. I used 'FHA Number_Dropdown'.Selected.'Property Name' as the Default of Property Name_Input, but it doesn't recognize the 'Property Name' column from the SharePoint list. Please help!

k_cain_0-1610463173467.png

k_cain_1-1610463182540.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@k_cain 

Helpful and important to know!

Anyway, from what I saw in your previous picture, the formula editor WAS showing the proper value for 'Property Name' so something else is gone a little strange in your control.

Let's troubleshoot:

Replace the 'FHA Number_Dropdown'.Selected.Title  in the Default property to be just : "Hello"

Does it show "Hello"?

No? The textinput control is gone wanky, save your app and close and then open again. Same? Remove the textinput (ctrl-X) and then undo (ctrl-Z)

Yes? Put a label somewhere on your screen and set the Text property to : 'FHA Number_Dropdown'.Selected.Title

Does it show the proper values? 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

View solution in original post

20 REPLIES 20
RandyHayes
Super User
Super User

@k_cain 

What is the formula for the Items property of FHA Number_Dropdown ?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
SPOfficer
Frequent Visitor

Hi, try giving the following formula a go in the 'Item' property of your Property Name field:

 

Filter('YOURDATASOURCEHERE', PROPERTYNAMEFIELDHERE = DataCardValue6.Selected.Value)

  

In the last bit, where it says DataCardValue6, you should put your dropdown to filter from + .Selected.Value

 

Hope it works. Take care

 

Randy,

The formula in the Items property of FHA Number_Dropdown is Distinct('A-MAP','FHA Number')

RandyHayes
Super User
Super User

@k_cain 

Yes, so this is going to give you a table with a single column called "Result".  You will not have the full record which will include the 'Property Name' column.

So, this brings the next question - why are you using Distinct?  And, if you are doing so because you have duplicate values and want a distinct list, then, if a user selects an item in the dropdown, how will you know which record is really the 'Property Name' that you want?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

The Property Name field doesn't have an Item property.  Should it? It's a text input.

Randy, I don't know why I am using Distinct. I will take it out. At some point, someone advised me to use Distinct there. Also, there are no duplicate values to worry about.

 

What formula do you recommend in the Items property of FHA Number_Dropdown?

 

RandyHayes
Super User
Super User

@k_cain 

Yeah, you don't need distinct unless you have duplicate values that you want to filter out.  But in your case, I believe you don't have them and the second bit of information - the property name - is important.

So, set your Items property formula on the Dropdown to :

    'A-MAP'

If you want them sorted, then:

    SortByColumns('A-MAP', 'FHA Number')

 

You will then have the 'FHA Number_Dropdown'.Selected.'Property Name' column available for your Property Name_Input default property.

 

Also, as an extra bonus - Distinct is not a delegable function, so, technically, if you don't need it, you could have introduced problems down the road should your list grow beyond your record limits in the app.

 

 

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Randy, I tried that, but it's still not populating the Property Name box.  Any ideas?  Thank you so much for your help.

RandyHayes
Super User
Super User

@k_cain 

So to recap, what is your Dropdown Items formula and your TextInput control default property?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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