cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
288088
Post Partisan
Post Partisan

Make the search in a lookup column in powerapps better?

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.

1 ACCEPTED SOLUTION

Accepted Solutions

@288088 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User III
Super User III

@288088 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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

@288088 

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

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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...

@288088 

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

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

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

@288088 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (943)