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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (42,367)