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

Combo box search by second text on a single column

Is it possible to search by second text on a single column? l'm using a combo box connect to a SharePoint list. If not is there a better approach?

Capture.PNGCapture1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Combo box search by second text on a single column

@oappdev 

Actually, if you use the SEARCH function it will look at the whole contents of the column.

If you just wanted to SEARCH on the last name only you'd need to put it in a separate column within your datasource or a collection.  I am thinking a collection is the better way to go here.

 

Assuming 'Center' is a single-line text field in SharePoint use this code to create a Collection in the OnVisible property of the screen.

ClearCollect(colComboOptions,
    AddColumns(
        your_datasource_name,
        "LastName",
        Split(Center," ")
    )
)

 

Then use it as the Items property of your gallery

colComboOptions

 

And change the SearchFields property to this

["LastName"]

 

Now your ComboBox will only search on the last name.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Combo box search by second text on a single column

@oappdev 

Actually, if you use the SEARCH function it will look at the whole contents of the column.

If you just wanted to SEARCH on the last name only you'd need to put it in a separate column within your datasource or a collection.  I am thinking a collection is the better way to go here.

 

Assuming 'Center' is a single-line text field in SharePoint use this code to create a Collection in the OnVisible property of the screen.

ClearCollect(colComboOptions,
    AddColumns(
        your_datasource_name,
        "LastName",
        Split(Center," ")
    )
)

 

Then use it as the Items property of your gallery

colComboOptions

 

And change the SearchFields property to this

["LastName"]

 

Now your ComboBox will only search on the last name.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Combo box search by second text on a single column

Thank you so much @mdevaney Let me give it a try and circle back 

Highlighted
Post Patron
Post Patron

Re: Combo box search by second text on a single column

Thank you @mdevaney That did the trick 👍

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,860)