cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danny_L
Helper III
Helper III

Filter issue

I'm wondering if this is possible and if so, what the syntax would be. 

 

I have an edit Form that has a text input box and a combo box.

 

Repaired Part Number (Sub-Assemblies) is the text input box

Repaired Part Number (Site Location) is the combo box

 

I want to filter my sql source to populate the combo box with only the site locations that exist for the text input box.

 

The items section of the dropbox is the dbo source

 

I can't for the life of me figure this out. I have done the following:

In the default property:

Filter(dbo,ItemPN=DataCardValue9.Text, Refdes)

Where ItemPN is in the dbo would = the text in the data card, return the refdes

It fails saying that it expects a record value not a text  value.

 

Any thoughts??

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Danny_L 

So if you want the ComboBox to only have locations based on the TextInput value, then you need to focus on the Items property of the ComboBox, not the Default.  The Default is what would set the value selected - and actually for a ComboBox, the Default pretty much does nothing, it is the DefaultSelectedItems that selects what you want.  But, be that as it may, the Items is where you want to focus.

Your Items property should be:

Filter(dbo, ItemPN=DataCardValue9.Text)

This assumes that your ItemPN is a text column. 

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
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

4 REPLIES 4
RandyHayes
Super User III
Super User III

@Danny_L 

So if you want the ComboBox to only have locations based on the TextInput value, then you need to focus on the Items property of the ComboBox, not the Default.  The Default is what would set the value selected - and actually for a ComboBox, the Default pretty much does nothing, it is the DefaultSelectedItems that selects what you want.  But, be that as it may, the Items is where you want to focus.

Your Items property should be:

Filter(dbo, ItemPN=DataCardValue9.Text)

This assumes that your ItemPN is a text column. 

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
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

Ok great. That's a start. How do I then get it to return the value from the Refdes (column name for Site Location in dbo source)  based on that part number?

 

 

@Danny_L 

Well, the formula I gave you is already filtering the items based on the Part Number supplied.

If you are referring to what is displayed, then you simply need to set the Primary Text Field in the properties to Refdes.

A combobox can have one of three different layouts - Single line, Double line, or Person

If you have a single line combobox, then set it's Primary Text field to Refdes and you will see all the results that would match the part number based on the filter, based on the input.

 

_____________________________________________________________________________________
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!

I found out why it was blank. I was filtering on the wrong column 😂

 

Thanks for your help. Very slowly starting to get the hang of this. Designing is easy. Syntax is where I get stuck sometimes.

 

Love this community

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,077)