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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Super User

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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
Users online (1,398)