cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Responsive Resident
Responsive Resident

Filter Drop Down based on Combo Box in Form

I'm trying to filter the items in a drop down based on what was selected in a combo box. The combo box SelectMultiple = false

I need to use a combo box because I have more then 500 items in the list.

 

Drop Down: Client_CardValue

Items: Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = (AssPartner_ComboBox.Selected,Assignment_Partner_Name).Assignment_Partner_Name)

 

Errors:

The equal sign is saying: Invalid argument type

Under the comma after selected: Unexpected characters. The formula contains 'ParenClose' where 'Comma' is expected

 

what am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
TesDA
Responsive Resident
Responsive Resident

I finally figured this out. There was an if statement in the items of the combobox which was causing the dropdown to not understand the data coming from the combobox. Deleting the if statement solved the problem.

View solution in original post

10 REPLIES 10
eka24
Super User III
Super User III

I guess the Combobox and the Dropdown have same Datasource. If so, change the formula to;

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = AssPartner_ComboBox.Selected.Assignment_Partner_Name)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

TesDA
Responsive Resident
Responsive Resident

@eka24 

When I do that I get 'invalid argument type above the equals sign and Name isn't valid.

Both the combobox and the dropdown are coming from different tables in sql however both have the column Assignment_Partner_Name

 

Combobox: AssPartner_ComboBox

Items: Sort('[dbo].[App_ICWO_HCM_CA_Matter_vps]', Assignment_Partner_Name)PowerAppsError.jpg

eka24
Super User III
Super User III

Try any of these;

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = AssPartner_ComboBox.Selected.Value)

 

Or

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name in AssPartner_ComboBox.Selected.Value)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

TesDA
Responsive Resident
Responsive Resident

@eka24 

 

Neither worked:

 

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name in AssPartner_ComboBox.Selected.Value)

I have an error under value: The name isn't valid. The identifier isn't recognized

 

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = AssPartner_ComboBox.Selected.Value)

Under equals: invalid argument type

Under value: The name isn't valid

 

 

AssPartner_ComboBox is a great field name.  Here are the two things I see:

 

1) It looks your combo box option is wrong.  Try combobox selected text

2) It doesn't look like it's reading it as text.  Try throwing Text(asspartner_combobox.selectedtext) and see if the equal sign error goes away

TesDA
Responsive Resident
Responsive Resident

@dyee4614 

 

You solved the error on the equals sign which is half of it, however now I'm getting:

The function Text has some invalid arguments

 

This is what I tried:

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = Text(AssPartner_ComboBox.SelectedText))

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = Text(AssPartner_ComboBox.SelectedText.Assignment_Partner_Name))

Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = (Text(AssPartner_ComboBox.SelectedText),Assignment_Partner_Name).Assignment_Partner_Name)

 

Any thoughts?

 

You need the ,"") in text.  Try this. 
Filter('[dbo].[App_ICWO_HCM_CA_Client_vps]', Assignment_Partner_Name = Text(AssPartner_ComboBox.SelectedText,""))

TesDA
Responsive Resident
Responsive Resident

I finally figured this out. There was an if statement in the items of the combobox which was causing the dropdown to not understand the data coming from the combobox. Deleting the if statement solved the problem.

View solution in original post

eka24
Super User III
Super User III

So after removing the if what was the final formula that worked for you

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,975)