cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Add searchbar

Capture.PNG

I currently have one search working and a dropdown. How can I integrate another searchbar in this code. The searchbar is called searchbar and I want it to filter by name. Additionally, how can I add an all feature to the dropdown because once you set it to something you can;t see all of the functional sources again.

If(
IsBlank(Dropdown1.SelectedText.Value),
Filter(
CCB,
StartsWith('Requirement Source',Filter.Text)
), Filter(
CCB,
StartsWith('Requirement Source',Filter.Text),
'Functional Area' in Dropdown1.SelectedText.Value
)
)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @powerapps890 ,

Could you please share more details about your error message?

Is the error message related to the ComboBox1.Selected.Value?

 

Please note that the .Value within the ComboBox1.Selected.Value represents the Display column value within your ComboBox. On your side, you may need to modify your formula as below:

Filter(
       CCB,
       If(
           IsBlank(ComboBox1.Selected.DisplayColumn),    // Modify formula here
           true,
           ComboBox1.Selected.DisplayColumn in 'Functional Area'
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

Note: Make sure you have set the SelectMultiple property of the ComboBox to false, so you could only select single one option from your ComboBox once time.

 

If you set the Items property of your ComboBox to a Distinct(...) formula, you should modify above formula as below:

Filter(
       CCB,
       If(
           IsBlank(ComboBox1.Selected.Result),    // Modify formula here
           true,
           ComboBox1.Selected.Result in 'Functional Area'
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi @powerapps890 ,

Could you please share more details about the formula you typed within the Items property of the Dropdown1?

Do you want to add another Search bar filter into your existing Filter formula?

Further, do you want to add a "All" feature to the Dropdown box to let you choose "All" feature?

 

If you want to add another Search bar filter into your existing Filter formula, please consider modify your formula as below:

 

Filter(
       CCB,
       If(
           IsBlank(Dropdown1.SelectedText.Value),
           true,
           'Functional Area' in Dropdown1.SelectedText.Value
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

 

 

If you want to add a "All" feature into your Dropdown1, I think you could consider add a ComboBox control in your app to list available options rather than Dropdown control (that you added). Then type some formula within the Items property of the ComboBox as that in your original Dropdown control. Set the SelectMultiple property of the ComboBox to false. Then the default value within the ComboBox would be blank, you could select or deselect option from the ComboBox.

Then you need to modify above Filter formula as below:

 

Filter(
       CCB,
       If(
           IsBlank(ComboBox1.Selected.Value),    // Modify formula here
           true,
           'Functional Area' in ComboBox1.Selected.Value
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

 

Within above Filter formula, it would check if the ComboBox selection is Blank, if true, it would not do any Filter operation against your 'Functional Area' column (in other words, it would retrieve all available 'Functional Area' value records), if not, it would filter your 'Functional Area' column value based on the selected ComboBox option.

 

Please consider take a try with above solution, hope it helps in your scenario.

 

Best regards,

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

Yes, I want all to be a choice in the dropdown. 

Highlighted

@v-xida-msft I tried the second one and it says that the function isBlank has invalid arguments.

Highlighted

Hi @powerapps890 ,

Could you please share more details about your error message?

Is the error message related to the ComboBox1.Selected.Value?

 

Please note that the .Value within the ComboBox1.Selected.Value represents the Display column value within your ComboBox. On your side, you may need to modify your formula as below:

Filter(
       CCB,
       If(
           IsBlank(ComboBox1.Selected.DisplayColumn),    // Modify formula here
           true,
           ComboBox1.Selected.DisplayColumn in 'Functional Area'
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

Note: Make sure you have set the SelectMultiple property of the ComboBox to false, so you could only select single one option from your ComboBox once time.

 

If you set the Items property of your ComboBox to a Distinct(...) formula, you should modify above formula as below:

Filter(
       CCB,
       If(
           IsBlank(ComboBox1.Selected.Result),    // Modify formula here
           true,
           ComboBox1.Selected.Result in 'Functional Area'
       ),
       If(
          IsBlank(Filter.Text),
          true,
          StartsWith('Requirement Source',Filter.Text)
       ),
       If(                                   // Add formula here
           IsBlank(Searchbar.Text),
           true,
           StartsWith(Name, Searchbar.Text)
       )
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,906)