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

Use dropdown to populate data

PAScreen.jpgI have a drop down that contains a distinct list of a sharepoint field named "Title". However, how can I get the edit form populate the data? The yello triangle says "Invalid Formula. Expected a value compatible with data source".

3 REPLIES 3
Highlighted
TML
Level 8

Re: Use dropdown to populate data

Can you give more details including your formula?

hpkeong
Level 10

Re: Use dropdown to populate data

Hi @Anonymous

 

If I am not mistaken, you are referring to:

- When Dropdown. OnChange or OnSelect, you wish your data to be filtered based on the selected results.

 

So, in any function, if you wish to filter selected items, you have to use:

- ClearCollect(NewCollecton, Ftiler(Original DS, FieldTitle = Dropdown.Selected.Result))

So when you change and select a new item in Dropdiwn, 

- Filter will fire and then

- ClearColelct will collect filtered information

 

Then, in your Gallery,Item = NewCollection.

The same applies for other control.

 

Hope this helps,


TQ

hpkeong
Community Support Team
Community Support Team

Re: Use dropdown to populate data

Hi @Anonymous,

 

Please check the following article for more details about how form works:

Understand data forms in Microsoft PowerApps

 

There are at least two property of the form control that need to be configured:

Data Source property, item property.

Item property should be one of the records from the Data source property, or at least has the same schema.

 

In your scenario, if you would like the form to display the record filtered by the Dropdown, then please take a try with the Lookup() function.

 

Lookup(DataSource, fieldName=Dropdown1.Selected.Value)

Which would return the first record that matchs the condition. For more details, see:

Filter, Search, and Lookup functions in PowerApps

 

Regards,

Michael

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

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,853)