web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Make the search in a l...
Power Apps
Answered

Make the search in a lookup column in powerapps better?

(0) ShareShare
ReportReport
Posted on by

I got this Lookup column in SP list that i've imported into powerapps into a form, I made the box IsSearchable=True and I can search, it works.

 

But can I somewhere insert more "Keyword" so the search gets better?

 

Example:

If I have to search for "Mr. Berta Jonsson" I have to type "Mr." If I type "Berta Jonsson" I wont get any results, just blank.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    In order to find those kind of results, you need to incorporate either Search or IN functions.  Neither of these are delegable to SharePoint - only StartsWith (and thus the results you see).

    Depending on the size of your datasource and the possibility of reducing the results to a subset (i.e. perhaps you only need to search like this on a small range of records), the delegation issue can be worked around.

    If you have any formulas or screenshots to explain your scenario further, please share.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes Hello and thanks for the reply!

     

    Its a small record, contains only 340 items.

     

    Its a DatacardValue in a form in powerapps, its the type combobox and its searchable.

     

    Items property is:

    Choices([@'Logg'].Cards)

    Searchfield:

    ["Value"]

    IsSearchable:

    true

     

     

    Bengtfors korrekt.PNG

     

     

    Bengtfors fel.PNG

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    Ah got it...I did not get that this was a ComboBox.  

    Yes, a ComboBox *should* be doing exactly what you want.  

    In your scenario, what happens if you just type in Norra - does it give you results?

     

    Here is the ComboBox with searching as it should be:

    ComboBoxSearch.gif

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

     

    Unfortunately that doesnt work for me. This column is a lookup column in sharepoint list, its connected to another list on sharepoint. When I insert it into a form in powerapps it says its a combobox in powerapps. I try to just search for "Norra" but it doesnt work...

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    Ah, it's a lookup column.  Yes you will have the results you are seeing with them due to the nature of them being complex data types in SharePoint.

     

    I would recommend that you add the list that is defined for the Lookup column to your App and then base your ComboBox on that list rather than on Choices.

    ComboBoxSearch2.gif

  • Community Power Platform Member Profile Picture
    on at

    @RandyHayes 

     

    Alright I understand. Can I put this new combobox into my form and patch that field somehow also?

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Anonymous 

    Yes, you can do that.  You have to do two more things though for it to work properly.

    1) Set the Default.  You will want to have any previous value appear if you edit a record, so, to get that to work, you will need to set the DefaultSelectedItems property of the Combobox to Filter(yourLookupList, ID=ThisItem.Cards.Id)

     

    2) You will need to set the UpdateProperty of your DataCard to the following:

    {
     Value: yourComboBox.Selected.Title,
     Id: yourComboBox.Selected.ID,
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
    }
    

    Substitute the name of your combobox, and the Title to whatever field you have defined in SharePoint to use from the Lookup list.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard